Discover Gists

View index.js
1 2 3 4 5 6 7 8 9 10
var events = require('events');
var wrap = function ( emitter, options )
{
emitter.pipe = function ( targetEmitter )
{
if (!this.pipes) this.pipes = [];
this.pipes.push(targetEmitter);
this._emit = this.emit;
this.emit = function ()
View Gemfile
1 2 3 4
source 'https://rubygems.org'
 
gem 'nokogiri'
gem 'feedjira'
View mysql
1 2 3 4 5 6 7 8 9 10
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /Applications/MAMP/db/mysql) or
View fcgitest.c
1 2 3 4 5 6 7 8 9 10
// libfcgi-dev includes
#define NO_FCGI_DEFINES 1
//#include <fcgio.h>
#include <fcgi_config.h>
#include <fcgi_stdio.h>
#include <string.h>
 
int main()
{
FCGX_Request request;
View example-3.rb
1 2 3
suits = %i[hearts clubs]
ranks = %i[ace two three four five six seven eight nine ten jack queen king]
cards = ranks.flat_map {|rank| suits.map {|suit| "#{rank} of #{suit}" } }
View 0_reuse_code.js
1 2
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:11075918
1 2 3 4 5 6 7 8 9 10
ckwalsh@ckwalsh:~$ cat foo.php
<?hh
namespace Foo;
class Bar {
function foobar(): this {
return $this;
}
}
View move to xm format
1 2 3 4 5 6 7 8 9
// attempt to find the extension
$phone_ext_parts = explode('x', $_value);
if (isset($phone_ext_parts[1])) {
$phone_ext = preg_replace("/\D/", "", $phone_ext_parts[1]);
$phone_part_1 = preg_replace("/\D/", "-", $phone_ext_parts[0]);
} else {
$phone_ext = '';
$phone_part_1 = preg_replace("/\D/", "-", $_value);
}
View gist:11075907
1 2 3 4 5 6 7 8 9 10
package mrtska.gui;
 
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.RandomAccessFile;
View gist:11075889
1
javascript:nemesis.dashboard.Dashboard.getInstance().map_.setOptions({styles:[]});
Something went wrong with that request. Please try again.