Skip to content

Instantly share code, notes, and snippets.

View philippeback's full-sized avatar
👽
Hackin'

Philippe Back philippeback

👽
Hackin'
View GitHub Profile
@seandenigris
seandenigris / gist:1438930
Last active October 23, 2016 23:13
Sample Metacello Workflow
"Describe Project Structure to Create configuration"
MetacelloToolBox
createBaseline: '1.0-baseline'
for: 'SimpleApplescript' "Project name"
repository: 'http://squeaksource.com/SPDPlayground'
requiredProjects: #('OSProcess')
packages: #('CommandShell-Piping' 'SimpleApplescript')
repositories: #()
dependencies: {
('SimpleApplescript' -> #('CommandShell-Piping')).

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@btoone
btoone / curl.md
Last active November 3, 2024 23:34
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@rjha
rjha / MySQLSession.php
Created May 13, 2012 17:09
PHP MYSQL based session handler with locking using select for update
<?php
namespace com\indigloo\core {
use \com\indigloo\Configuration as Config;
use \com\indigloo\mysql\PDOWrapper;
use \com\indigloo\Logger as Logger;
/*
* custom session handler to store PHP session data into mysql DB
@jcromartie
jcromartie / BlockClosure-memoized.st
Last active October 4, 2015 21:57
Memoization for Smalltalk
'Copyright (c) 2014 John Cromartie
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@ralphschindler
ralphschindler / example.php
Created October 24, 2012 23:18
Zend\Db\Sql\Select example usage
<?php
use Zend\Db\Sql\Select;
// basic table
$select0 = new Select;
$select0->from('foo');
// 'SELECT "foo".* FROM "foo"';
@sturadnidge
sturadnidge / tmux-1.8-on-CentOS-6.x.txt
Last active May 10, 2021 18:31
Install tmux 1.8 on CentOS 6.x minimal (64bit)
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel
@ndarville
ndarville / business-models.md
Last active October 23, 2024 17:18
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@seandenigris
seandenigris / gist:4945462
Last active December 13, 2015 17:08
Pharo Smalltalk SSH/SFTP Client
"Set the following variables, some of which have reasonable defaults, for your environment"
The required expect file lives at https://gist.github.com/seandenigris/4945436"
command := 'sftp'. "Tested with ssh and sftp"
userName := 'root'.
ipAddress := ''.
password := ''.
prompt := 'sftp> '.
expectFilePath := '/path/to/expect_file.exp'.
escapedPassword := password copyReplaceAll: '"' with: '\"'.
@ogrrd
ogrrd / Git info in bash.md
Last active October 26, 2018 10:00
Git info in your bash prompt

Git info in your bash prompt

Edit ~/.bash_profile and add the following

# git
if [ -f ~/.bash_git ]; then
    . ~/.bash_git
fi