Skip to content

Instantly share code, notes, and snippets.

View nuc's full-sized avatar
🍱
Always Hungry

Georgios Giannoutsos Barkas nuc

🍱
Always Hungry
View GitHub Profile
@nuc
nuc / bridge.html
Last active December 26, 2015 21:59
iFrame bridge for IE9 cors support (abstracted from moviepilot.com)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>document.domain = "moviepilot.com"</script>
</head>
<body></body>
</html>
@nuc
nuc / gen-pdf.sh
Last active December 15, 2015 02:19
Coffeescript class hierarchy graph
# You'll need:
# - brew install ack
# - brew install graphviz
echo 'digraph G {' > coffee-class-hierarchy.gv
ack -h '\s+class.*extends' ./app/assets/javascripts | sed 's/.*[[:space:]]\([[:alpha:]]*\)[[:space:]]extends[[:space:]]\([[:alpha:]]*\)$/\"\1\" -> \"\2\";/g' >> coffee-class-hierarchy.gv
echo '}' >> coffee-class-hierarchy.gv
dot -Tpdf coffee-class-hierarchy.gv > coffee-class-hierarchy.pdf
@nuc
nuc / README.md
Created August 9, 2012 08:20 — forked from bloudermilk/README.md
Facebook Page Categories

All of the categories!

A really simple JavaScript script that uses jQuery to extract all the categories from Facebook's "Create a page" page.

Works only on chrome, copies all categories into the clipboard!

Instructions

  1. Navigate to the Create a page page.
  2. jquery-inject the page (only for Chrome).
@nuc
nuc / rMBP-install.md
Created August 2, 2012 09:46
Retina MacBook Pro Installation Guide

These are some notes I put together prior to and during setting up my new Retina MacBook Pro. If anyone else is setting up a new machine, it may help you with the process.

Prepare Old Machine

  • Verify Disk with Disk Utility—see here
  • Generate a final TimeMachine backup
  • Verify Crashplan backup is complete
  • Create a final SuperDuper! bootable backup
  • Push changes to remote git repos
@nuc
nuc / .ackrc
Last active October 6, 2015 03:38
Ack config
# Add filters for file types
# Javascript
--type-set
js=.js
# CoffeeScript
--type-set
coffee=.coffee
# Both Javascript and CoffeeScript
@nuc
nuc / randomthumbs.rb
Created April 22, 2012 08:34 — forked from psobot/randomthumbs.rb
Random Image Thumbnailer
# Hacky random image thumbnailer.
# by Peter Sobot, April 21, 2012
# Based heavily on code by Michael Macias
# (https://gist.github.com/a54cd41137b678935c91)
require 'rmagick'
images = Dir.glob(ARGV[0] ? ARGV[0]
: '-default-input-paths-')
output_dir = (ARGV[1] ? ARGV[1]
@nuc
nuc / hack.sh
Created March 31, 2012 14:36 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@nuc
nuc / gist:2204911
Created March 26, 2012 13:05
capybara_webkit wait until ajax completion
wait_until do
page.evaluate_script('$.active') == 0
end
@nuc
nuc / gist:1834765
Created February 15, 2012 09:33 — forked from technogoat/gist:1528381
Git: Delete a batch of remote tags
$ git ls-remote --tags origin | awk '/^(.*)(\s+)(.*[a-z0-9])$/ {print ":" }' | xargs git push origin
@nuc
nuc / progress_with_names.rb
Created November 16, 2011 17:39 — forked from natritmeyer/progress_with_names.rb
An rspec formatter that prints each test name and result to the console on a new line - hudson likes it
require "rspec/core/formatters/base_text_formatter"
class ProgressWithNames < RSpec::Core::Formatters::BaseTextFormatter
def example_passed(example)
super(example)
output.print green(".")
end
def example_pending(example)
super(example)