Skip to content

Instantly share code, notes, and snippets.

View netsensei's full-sized avatar
👾
retro-wave driven development

Matthias Vandermaesen netsensei

👾
retro-wave driven development
View GitHub Profile
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
# [Tue Feb 14 10:37:36 2012] Protocol: http, Server: 192.168.5.10:9200
curl -XPUT 'http://127.0.0.1:9200/foo/?pretty=1' -d '
{
"settings" : {
"analysis" : {
"analyzer" : {
"lc" : {
"filter" : [
"lowercase"
],
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@afair
afair / gist:2402068
Last active September 21, 2024 21:06
Perl References for Kittens

Perl References

Simple Perl variables are called scalars. Examples of scalar values are

   $number      = 123;
   $string      = "String";
   $file_handle = open "<filename";
   $null_value  = undef;
 $instance = MyClass-&gt;new;
@hakre
hakre / schematest.php
Created December 13, 2012 18:57
Speeding up XML schema validations of a batch of XML files against the same XML schema (XSD)
<?php
/**
* @link http://stackoverflow.com/questions/13865149/speeding-up-xml-schema-validations-of-a-batch-of-xml-files-against-the-same-xml
*/
$mapping = [
'http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd' => 'schema/xhtml1-transitional.xsd',
'http://www.w3.org/2001/xml.xsd' => 'schema/xml.xsd',
];
@fubhy
fubhy / .gitconfig
Last active September 20, 2016 02:51
My personal .gitconfig (mostly stolen from others) :-)
[user]
# Credentials.
name = Foo Bar
email = [email protected]
drupal = $(whoami)
[credential]
# Save passwords in ~/.git-credentials.
helper = store
@joyrexus
joyrexus / README.md
Last active June 8, 2024 00:43
Perl one-liners

Hi:

perl -e 'print "hello world!\n"'

A simple filter:

perl -ne 'print if /REGEX/'

Filter out blank lines (in place):

@revmischa
revmischa / install-plenv.sh
Last active July 12, 2022 02:25
Set up plenv, install perl, cpanm, carton, set up environment
#!/bin/bash
# installs plenv, perl, carton, cpanminus, sets up environment in .bash_profile
# from https://github.com/tokuhirom/plenv#readme
PLENV_PERL_VERSION='5.18.1'
if [[ -n "$PERL_MB_OPT" ]]; then
echo "You must unset your local::lib environment variables first"
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active September 24, 2024 14:47
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.