Skip to content

Instantly share code, notes, and snippets.

View rogeruiz's full-sized avatar

Roger Steve Ruiz rogeruiz

View GitHub Profile
@rogeruiz
rogeruiz / tiny_letter_mod.php
Created April 5, 2018 17:36 — forked from huzairyworks/tiny_letter_mod.php
TinyLetter embed code
<form action="http://tinyletter.com/mohdhuzairy" method="post" target="popupwindow" onsubmit="window.open('http://tinyletter.com/mohdhuzairy', 'popupwindow', 'scrollbars=yes,width=800,height=600');return true"><p><input type="text" name="emailaddress" value="Masukkan emel anda" onfocus="if (this.value == 'Masukkan emel anda') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Masukkan emel anda';}" /></p><input type="hidden" value="1" name="embed"/><input type="submit" value="Subscribe" /><p>Powered by <a href="http://tinyletter.com"> TinyLetter</a></p></form>
@rogeruiz
rogeruiz / gist:efe3971077b31b29350de71c81edd0c7
Created March 2, 2017 14:30 — forked from snaga/gist:7495184
postgresql.conf @ RDS for PostgreSQL
testdb=> SELECT name,setting,unit FROM pg_settings;
name | setting | unit
---------------------------------+---------------------------------------------+------
allow_system_table_mods | off |
application_name | psql |
archive_command | /etc/rds/dbbin/pgscripts/rds_wal_archive %p |
archive_mode | on |
archive_timeout | 300 | s
array_nulls | on |
authentication_timeout | 60 | s
@rogeruiz
rogeruiz / playground.rs
Created November 23, 2016 14:20 — forked from anonymous/playground.rs
Shared via Rust Playground
extern crate curl;
use curl::http;
fn main() {
let url = "https://www.hautelook.com/api";
let resp = http::handle()
.get(url)
.exec()
.unwrap_or_else(|e| {
@rogeruiz
rogeruiz / gource.md
Created November 3, 2016 01:04 — forked from ChuckJHardy/gource.md
Gource Recording for Git

Install Gource

brew install gource

Convert Quicktime Movie to Animated Gif

ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

Record Gource

Show me the code! Do you prefer seeing how something works instead of instructions? If so, check out this pull request to the Amortize module. Each instruction below lives as its own commit. cfpb/amortize#11

1. Add an .npmrc file.

The contents of the file should be:

save-exact=true
var gulp = require("gulp");
var sass = require("gulp-sass");
var Eyeglass = require("eyeglass").Eyeglass;
var eyeglass = new Eyeglass({
// ... node-sass options
importer: function(uri, prev, done) {
done(sass.compiler.types.NULL);
}
});
@rogeruiz
rogeruiz / workspace.sh
Created February 23, 2016 16:47 — forked from dixson3/workspace.sh
Create and manage a case-sensitive disk-image on OSX. This is great when you have a need to work with case-sensitive repos on a mac.
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
@rogeruiz
rogeruiz / .eslintrc
Created November 17, 2015 15:16 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@rogeruiz
rogeruiz / single-tweet
Last active August 29, 2015 14:27 — forked from joshcanhelp/single-tweet
Create a widget at Settings > Widgets > Create New, add your Twitter name, check "Exclude replies, uncheck "Auto-expand photos", then Create Widget, find the data-widget-id attribute and paste in this Gist
<div class="home-tweet">
<h6>Latest Tweet</h6>
<a class="twitter-timeline" data-dnt="true" href="[[DIRECT TWITTER PROFILE URL]]" data-widget-id="[[TWITTER WIDGET ID]]"
data-link-color="#ce2029" data-chrome="nofooter noheader noscrollbar noborders transparent" data-tweet-limit="1">
<script>!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = p + "://platform.twitter.com/widgets.js";
@rogeruiz
rogeruiz / tmux.conf
Last active August 29, 2015 14:27 — forked from shinzui/tmux.conf
tmux.conf
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#