Skip to content

Instantly share code, notes, and snippets.

View gustin's full-sized avatar
🦁
Happy

gustin gustin

🦁
Happy
View GitHub Profile
@gustin
gustin / 0-readme.md
Created January 31, 2012 01:03 — forked from burke/0-readme.md
ruby-1.9.3-p0 cumulative performance patch.

Patched ruby 1.9.3-p0 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

@btoone
btoone / curl.md
Last active June 29, 2024 16:01
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
@peb7268
peb7268 / testem.yml
Created May 1, 2013 15:33
testem setup
launchers:
integration:
command: "rspec testing/integration"
headless:
command: "HEADLESS=1 rspec testing/integration"
src_files:
- testing/integration/*.rb
- app/webroot/js/src/global.js
test_page: app/webroot/js/SpecRunner.html
launch_in_dev:
@paulirish
paulirish / gist:5558557
Last active April 18, 2024 14:32
a brief history of detecting local storage

A timeline of the last four years of detecting good old window.localStorage.


Jan Lenhart, bless his heart contributed the first patch for support:

October 2009: 5059daa

@surjikal
surjikal / install.md
Last active July 23, 2018 19:05
Presto Installation Instructions for OSX
  1. Install JDK 1.8

  2. See if JAVA_HOME ENV variable is set to 1.8. If not, add this line in your ~/.bashrc:

    export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
    

    And apply the changes to your session:

source ~/.bashrc

@evblurbs
evblurbs / 01_cron.config
Created May 19, 2015 08:17
Elastic Beanstalk config file for Whenever gem.
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/01_cron.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
# Using similar syntax as the appdeploy pre hooks that is managed by AWS
set -xe
@p4tin
p4tin / sqsQueueUtil.go
Last active August 1, 2022 03:45
Simple Utility to access Amazon SQS (or local ElasticMQ) using Go
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sqs"
"os"
"flag"
)
@axic
axic / stringaskey.sol
Last active July 10, 2019 00:10
How to use string as a key in a mapping in Solidity aka. how to store short strings cheape
//
// In Solidity, a mapping is like a hashmap and works with `string` like this:
// mapping (string => uint) a;
//
// However it doesn't support accessors where string is a key:
// mapping (string => uint) public a;
//
// "Internal compiler error: Accessors for mapping with dynamically-sized keys not yet implemented."
//
// An accessor returns uint when called as `a(string)`.
@nerdyworm
nerdyworm / rename.sh
Created July 30, 2016 17:40
rename a phoenix project
#!/bin/bash
set -e
CURRENT_NAME="CurentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"
@llopv
llopv / nacl.html
Created July 8, 2017 10:17
Generating simmetric key, encrypt and decript "hello" with webcrypto and tweetnacl-js.
<script src="nacl-fast.js"></script>
<script>
function bytesToBase64(bytes) {
let binary = "";
let len = bytes.byteLength;
for (let i = 0; i < len; i++) {
binary += String.fromCharCode(bytes[i]);
}
return window.btoa(binary);