Skip to content

Instantly share code, notes, and snippets.

View rogeruiz's full-sized avatar

Roger Steve Ruiz rogeruiz

View GitHub Profile
@rogeruiz
rogeruiz / ffmpeg2ambient
Last active August 29, 2015 14:16
A simple and easy CLI for converting video files to ambient video files used in web browsers.
#!/bin/bash
# README
# Requires ffpmeg to be installed with some extra dependencies. I used the following
# brew install command and so can you.
# `brew install ffmpeg brew reinstall ffmpeg --with-theora --with-libvorbis --with-libvpx`
# Input name should be the path to your actual file including the extension.
INPUT_FILE_NAME=$1;
# Output name should be just the name of the output files without an extension.
// Just a sketch - this API isn't implemented (yet)
// Common base class shared by all plugins
var makePlugin = require('broccoli-plugin')
var mergeTrees = makePlugin({
init: function(inputTrees, options) {
// You can define this function with any parameters you like; inputTrees
// and options are merely conventional. All arguments will be passed
// through from the plugin constructor.
@joshcanhelp
joshcanhelp / single-tweet
Created August 14, 2015 16:19
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 / .gitalias
Last active October 12, 2015 18:38
Git aliases that I find useful.
[alias]
co = checkout
ci = commit
st = status
br = branch
fall = fetch --all
mr = merge
unstage = reset HEAD
pl = pull
ps = push
@passcod
passcod / hookz.rb
Created August 15, 2013 04:10 — forked from anonymous/hookz.rb
Hookz: Lolcommits plugin to execute custom hooks. Place an executable (shell script, binary, something else with a shebang...) in ~/.lolcommits/project-name/Hookfile, and it will be called every time a commit picture is taken, with its path as argument. Use for anything you can't be bothered writing Ruby for: posting to tumblr, sending email, up…
module Lolcommits
class Hookz < Plugin
def initialize(runner)
super
self.name = 'hookz'
self.default = true
end
def run

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
#!/usr/bin/env python
import json
import sys
import subprocess
# To use this script: `uaac` and `cf` must be in your PATH
#
# Use `uaac target` and `uaac token client get` to ensure uaac can perform operations
#
@bravelee
bravelee / Macvim-vimrc-bak
Created December 21, 2013 16:17
the '.vimrc' file for macvim (based on mavericks 10.9.1)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer: amix the lucky stiff
" http://amix.dk - amix@amix.dk
"
" Version: 3.6 - 25/08/10 14:40:30
"
" Blog_post:
" http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc
" Syntax_highlighted:
" http://amix.dk/vim/vimrc.html
@jmcarp
jmcarp / merge.rb
Created March 8, 2017 00:18
template-pipeline
#!/usr/bin/env ruby
require 'erb'
require 'yaml'
inputs = ARGV
template = ERB.new(File.read('pipeline.yml.erb'))
b = binding
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())