Skip to content

Instantly share code, notes, and snippets.

@witwall
witwall / php.ini
Created February 16, 2016 14:13
php.ini(PHP 5.6.15)
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@witwall
witwall / hosts
Created November 4, 2013 14:25
hosts
#UPDATE:2013-07-07 21:01
127.0.0.1 localhost
#SmartHosts START
#Google Services START
203.208.46.200 0.docs.google.com
203.208.46.200 0.drive.google.com
203.208.46.200 1.docs.google.com
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
import java.awt.Image;
import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.PixelGrabber;
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
</IfModule>
Options +FollowSymLinks +ExecCGI
RewriteEngine On
@witwall
witwall / 1 - setting up RVM.sh
Created April 6, 2013 08:55
RVM and Bundler on Dreamhost, I can access https://gist.github.com/muffinista/3276350, so I copy it from the google cache
#
# Step One - Installing RVM
#
curl -L https://get.rvm.io | bash -s stable --ruby
# Then, install ruby 1.8.7 -- you need to basically match the same version of Ruby as Dreamhost
rvm install ruby-1.8.7-p334
<?PHP
require __DIR__ . '/vendor/autoload.php';

$log = new Monolog\Logger('name');
$log->pushHandler(new Monolog\Handler\StreamHandler('app.log', Monolog\Logger::WARNING));
$log->addWarning('Foo');
?>
@witwall
witwall / php.ini
Last active November 19, 2015 14:45
;for windows
extension_dir = "ext"
extension=php_pdo_sqlite.dll
extension=php_sqlite3.dll
;for linux
extension=php_pdo_sqlite.so
extension=php_sqlite3.so
package org.getlantern.firetweet.model;
import org.getlantern.firetweet.FiretweetConstants;
// Flashlight client
import go.client.Client;
import android.content.Context;
import android.util.Log;
import android.os.StrictMode;
:CheckOS
IF EXIST "%windir%\SysWOW64\MCPrintX.dll" (GOTO 64BIT) ELSE (GOTO 32BIT)
:64BIT
echo 64-bit...
set dir="%windir%\SysWOW64"
GOTO END
:32BIT
/*jshint strict:false*/
/*global CasperError, console, phantom, require*/
/**
* Capture multiple pages of google search results
*
* Usage:
*
* $ casperjs googleresults.js my search terms
* $ casperjs googleresults.js my search terms --limit=5