Skip to content

Instantly share code, notes, and snippets.

View oaleynik's full-sized avatar

Oleh Aleinyk oaleynik

  • CloudSpot
View GitHub Profile

To Update to 1.0.1l (This is the most 'up to date' OpenSSL, but is a major revision to the system OpenSSL and consequently carries more risk than the minor revision above.).

Open up ‘Terminal’ under /Applications/Utilities and execute:

@oaleynik
oaleynik / Makefile
Created December 17, 2014 17:09 — forked from andreypopp/gist:5588256
Sample Makefile
BIN = ./node_modules/.bin
SRC = $(wildcard src/*.coffee)
LIB = $(SRC:src/%.coffee=lib/%.js)
build: $(LIB)
lib/%.js: src/%.coffee
@mkdir -p $(@D)
@$(BIN)/coffee -bcp $< > $@
@oaleynik
oaleynik / .bashrc
Last active August 29, 2015 14:07
Bash utility to fetch latest stable version of any bower library
# function to fetch the latest stable version from bower
function bstable {
if [ -z "$1" ]; then
echo "Usage: bstable <bower lib>"
else
bower info $1 | awk '$0 ~ / - ([[:digit:]\.]+$)/ {print $2;exit}'
fi
}
#!/bin/bash
# Assume XCode and its command line tools are installed
mkdir bash-fix
cd bash-fix
# First patch
curl https://opensource.apple.com/tarballs/bash/bash-92.tar.gz | tar zxf -
cd bash-92/bash-3.2
#! /usr/bin/env bash
#apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
export build=$HOME/.devtools # or wherever you'd like to build
export locals=$HOME/local
mkdir -p $locals $build
echo "Adding $locals/bin to \$PATH" >&2
echo "export PATH=$locals/bin:\$PATH" >> ~/.bashrc
. ~/.bashrc
@oaleynik
oaleynik / install-git.sh
Last active August 29, 2015 14:04
Install git from the source code
# apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
export build=$HOME/.devtools # or wherever you'd like to build
export locals=$HOME/local
mkdir -p $locals $build
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
# make sure that autoconf exists
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
// Only add setZeroTimeout to the window object, and hide everything
// else in a closure.
(function() {
var timeouts = [];
var messageName = "zero-timeout-message";
// Like setTimeout, but only takes a function argument. There's
// no time argument (always zero) and no arguments (you have to
// use a closure).
function setZeroTimeout(fn) {
@oaleynik
oaleynik / 0_reuse_code.js
Created July 4, 2014 11:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console