Skip to content

Instantly share code, notes, and snippets.

View jaromero's full-sized avatar

Antonio Romero jaromero

View GitHub Profile
@jaromero
jaromero / rw.sh
Created December 9, 2011 20:05
Quick n' dirty window resize script
#!/bin/bash
E_BADARGS=65
usage()
{
cat << EOF
usage: $0 [options|dimensions]
<dimensions>
@jaromero
jaromero / wow.sh
Created March 19, 2012 11:03
Wine launcher for World of Warcraft
#!/bin/bash
# Set the following to your wine binary
WINE_BIN=wine64
#WINE_BIN=/opt/wine1.5-amd64/bin/wine64
# Where WoW lives in your system
WOW_DIR=$HOME/WoW
# Comment to re-enable debug messages
@jaromero
jaromero / tvtropes-kill-title.user.js
Created July 14, 2012 01:14
TVTropes spoiler title killer GM script
// ==UserScript==
// @name TVTropes spoiler title
// @namespace http://gm.nsdragon.net/
// @version 0.1
// @description Kills title attributes on spoilers so they don't get in the way
// @match http://*.tvtropes.org/*
// @match http://tvtropes.org/*
// @copyright 2012+, https://github.com/jaromero
// @license Public Domain
// @downloadURL https://gist.github.com/raw/3108638/tvtropes-kill-title.user.js

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

@jaromero
jaromero / Gruntfile.js
Created August 14, 2013 23:24
Sample kludgey Gruntfile.js to use with coffeescript and r.js
// Generated on 2013-07-10 using generator-webapp 0.2.6
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:

Yeoman 1+ in Windows in 5 minutes

These steps are all performed in cmd.exe

  1. Install Chocolatey NuGet
  2. Install node.js and ruby:
    1. cinst nodejs.install (the "nodejs" package does not include npm, which we do need)
    2. cinst ruby1.9 (the "ruby" package installs ruby 2.0, which might not work)
  3. Restart cmd.exe because Windows is dumb and can't see the new binaries yet in cmd.exe
  4. gem install compass --pre (NuGet has a "compass" package, but it's old, outdated, and doesn't work anymore)
@jaromero
jaromero / dom-based-routing.coffee
Last active August 29, 2015 14:20
DOM-based routing in CoffeeScript
# DOM-based routing
# http://paulirish.com/2009/markup-based-unobtrusive-comprehensive-dom-ready-execution/
# Now ported to coffeescript by [email protected]
UTIL =
fire: (func, funcname, args) ->
namespace = SITE # indicate your obj literal namespace here
funcname = if funcname? then 'init' else funcname
namespace[func]?[funcname]? args
@jaromero
jaromero / commit-guidelines.md
Last active August 25, 2016 00:36
Commit message guidelines

Commit Message Guidelines

These guidelines are meant to be a simple, effective way to quickly discern the type of contribution in our projects, as well as an attempt to enforce limiting commits to a single topic and avoid unwieldy commits

It's based on Angular's contribution guidelines, and this document about commit messages in general. I suggest that you give them a read, too.

The general idea

A commit message consists of, at the very least, the summary. It may also include a body, separated from the summary by a blank line.

@jaromero
jaromero / date.js
Created October 16, 2015 22:44
Kludgey monkey-patched ES6 UTC-enabled Date()
// Do not use if you need something else from Date
// This only naively looks for a date with the format YYYY-MM-DD
// No other cases are covered or guaranteed to still work
// This is just a demo
// Save the old Date thing
var _Date = Date;
// Override the native Date thing
Date = function (string) {
@jaromero
jaromero / checkerboard.scss
Created February 5, 2016 18:56
Checkerboard background pattern mixin
@mixin checkerboard ($c1, $c2, $sx, $sy) {
// Usage:
// @include checkerboard(<color 1>, <color 2>, <cell width>, <cell height>);
$sx2: ($sx * 2);
$sy2: ($sy * 2);
background: {
color: $c1;
image: linear-gradient(to bottom right, $c2 25%, transparent 25%, transparent 75%, $c2 75%, $c2),
linear-gradient(to bottom right, $c2 25%, transparent 25%, transparent 75%, $c2 75%, $c2);
position: 0 0, $sx $sy;