Fira Font
https://github.com/mozilla/Fira
Mozilla’s new Fira font looks great. Looking forward to use it on some future projects.
https://github.com/mozilla/Fira
Mozilla’s new Fira font looks great. Looking forward to use it on some future projects.
if(`table`.`start`='0000-00-00','',`table`.`start`)
That’s the part of my query that was increasing the execution time by 10x.
I changed it to just `table`.`start` (without the IF statement) and the query was 10x faster.
“A Hello World application to get started with PhoneGap Build.”
Updated 2026-09-26: reworked for current twilio-php.
Back in 2013 this meant patching a CURLOPT_PROXY line into the library’s TinyHttp.php, and I asked for a proxy option in twilio-php#144. Current twilio-php’s CurlClient takes an array of curl options, so put the proxy there and pass the client to Client as its fifth argument:
<?php
require __DIR__ . '/vendor/autoload.php';
use Twilio\Http\CurlClient;
use Twilio\Rest\Client;
$httpClient = new CurlClient([
CURLOPT_PROXY => 'http://192.0.2.10:8080',
CURLOPT_SUPPRESS_CONNECT_HEADERS => true,
]);
$twilio = new Client($sid, $token, null, null, $httpClient);
CURLOPT_SUPPRESS_CONNECT_HEADERS keeps the proxy’s reply to CONNECT out of the response. CurlClient only strips that reply when it’s a bare status line, so a proxy that adds headers to it, like tinyproxy, breaks response parsing without the option.
Error: Can’t find out if NetworkManager is running: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory.
The following fixed the problem:
apt-get install dbus
(if you already have dbus installed: sudo service dbus start)
/etc/init.d/network-manager start
What caused the error?:
/etc/init.d/network restart
** (process:17986): WARNING **: error: could not connect to NetworkManager
Fix: Try running with sudo.
For example: sudo nm-tool | grep DNS
http://pythonhosted.org/tendo/
from tendo.singleton import SingleInstance
# If is there another instance already running:
# display the message "Another instance is already running, quitting.", and raise SingleInstanceException.
me = SingleInstance()
WinSCP: how to prevent timeouts
That’s a guide to making WinSCP send a dummy command every 30 seconds to keep your connection alive. It’s way better than constantly having to type in your password.
I wanted to run a script every 20 minutes, so I put this into my crontab:
20 * * * * sh script.sh
That’s wrong. That only runs it once every hour 20 minutes into the hour. For example, 20,40 * * * * sh bash.sh would run it twice - 20 and 40 minutes into the hour.
To run the script every 20 minutes like I was expecting:
*/20 * * * * sh script.sh
http://chevronscode.com/yii-include-preload-yiigridview-javascript/
I ended up with the following code at the top of the page (since I’m not using a layout):
Yii::app()->clientScript->registerCoreScript('jquery');
$assetsScriptUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.widgets.assets'));
Yii::app()->getClientScript()->registerScriptFile($assetsScriptUrl .'/gridview/jquery.yiigridview.js');