Skip to content

Instantly share code, notes, and snippets.

@arkadiusjonczek
arkadiusjonczek / gist:8836e724a53ddd55362644745cf8ca4c
Created December 31, 2016 01:30
Start Chrome in App Mode on Mac OS X
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="http://www.google.de"
port module Spelling exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import String
main =
@JordanReiter
JordanReiter / crontab
Last active July 11, 2023 10:39
Remind yourself of what you did over the past day and week by reading a summary of all of your git commits.
0 22 * * 1,2,3,4,5 /path/to/git_changes.sh /path/to/projects/ # Sends 5 PM EST if server time is UTC
0 21 * * 5 /path/to/git_changes.sh -w /path/to/projects # Sends Friday @ 4PM EST if server time is UTC
@petarov
petarov / Multiple PHP versions on Archlinux.md
Created March 22, 2015 13:44
Multiple PHP versions on Archlinux

This describes the steps required to configure multiple PHP versions on your development system, if you have issue using the AUR package. Normally one may install the AUR package on a custom path, .e.g, /usr/local/php, but if you are like me having some issues with that you might want to try a custom compile.

Pay attention to step 6) as this is where any required extensions are enabled. For this setup we generally need pdo and mysql extensions.


  1. Download PHP version 5.3.13 (or any version that you are interested in) from http://php.net/releases/

  2. Download the php53 AUR package from https://aur.archlinux.org/packages/php53/

export LS_COLORS="no=00;38;5;244:rs=0:di=00;38;5;33:ln=01;38;5;37:mh=00:pi=48;5;230;38;5;136;01:so=48;5;230;38;5;136;01:do=48;5;230;38;5;136;01:bd=48;5;230;38;5;244;01:cd=48;5;230;38;5;244;01:or=48;5;235;38;5;160:su=48;5;160;38;5;230:sg=48;5;136;38;5;230:ca=30;41:tw=48;5;64;38;5;230:ow=48;5;235;38;5;33:st=48;5;33;38;5;230:ex=01;38;5;64:*.tar=00;38;5;61:*.tgz=01;38;5;61:*.arj=01;38;5;61:*.taz=01;38;5;61:*.lzh=01;38;5;61:*.lzma=01;38;5;61:*.tlz=01;38;5;61:*.txz=01;38;5;61:*.zip=01;38;5;61:*.z=01;38;5;61:*.Z=01;38;5;61:*.dz=01;38;5;61:*.gz=01;38;5;61:*.lz=01;38;5;61:*.xz=01;38;5;61:*.bz2=01;38;5;61:*.bz=01;38;5;61:*.tbz=01;38;5;61:*.tbz2=01;38;5;61:*.tz=01;38;5;61:*.deb=01;38;5;61:*.rpm=01;38;5;61:*.jar=01;38;5;61:*.rar=01;38;5;61:*.ace=01;38;5;61:*.zoo=01;38;5;61:*.cpio=01;38;5;61:*.7z=01;38;5;61:*.rz=01;38;5;61:*.apk=01;38;5;61:*.gem=01;38;5;61:*.jpg=00;38;5;136:*.JPG=00;38;5;136:*.jpeg=00;38;5;136:*.gif=00;38;5;136:*.bmp=00;38;5;136:*.pbm=00;38;5;136:*.pgm=00;38;5;136:*.ppm=00;38;5;136:*.tga=00;38;5;136:*.xbm
@nikita2206
nikita2206 / gist:7354392
Created November 7, 2013 13:14
php-src patch for allowing array_unique to take callback as an argument for comparing elements...
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 411e8de..1dcdf76 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -120,6 +120,7 @@ PHP_MINIT_FUNCTION(array) /* {{{ */
REGISTER_LONG_CONSTANT("SORT_LOCALE_STRING", PHP_SORT_LOCALE_STRING, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SORT_NATURAL", PHP_SORT_NATURAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SORT_FLAG_CASE", PHP_SORT_FLAG_CASE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SORT_USERDEFINED", PHP_SORT_USERDEFINED, CONST_CS | CONST_PERSISTENT);
@gmodarelli
gmodarelli / Setup Solarized for Gnome on Ubuntu 13.04.md
Last active July 14, 2020 15:59
Setup Solarized for Gnome on Ubuntu 13.04

Dark version

wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark
mv dircolors.ansi-dark .dircolors
eval `dircolors ~/.dircolors`

git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized
./set_dark.sh
@OrangeTux
OrangeTux / config
Last active June 19, 2021 13:18
Config for Irssi to connect to various XMPP chat servers. Replace the passwords, usernames an ids by your own. Remember, the irssi-xmpp (http://cybione.org/~irssi-xmpp/) plugin is requried.
# irssi-xmpp plugin required
# http://cybione.org/~irssi-xmpp/
servers = (
{
address = "chat.facebook.com";
chatnet = "facebook";
password = "<password>";
autoconnect = "true";
},
{
@baris
baris / irssi_notify.pl
Created January 8, 2013 06:31
irssi notify.pl using notify-send (instead of dbus-send) on ubuntu.
##
## Put me in ~/.irssi/scripts, and then execute the following in irssi:
##
## /load perl
## /script load notify
##
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
@max-mapper
max-mapper / readme.md
Created August 19, 2012 05:18
put-a-closure-on-it

Put a closure on it

Sometimes you'll have objects that manage state along with event handling. This happens frequently in MVC apps. Let's start with a messy example:

var Launcher = function(rocket) {
  this.rocket = rocket
}

Launcher.prototype.isReady = function() {