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 / .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 / 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 / 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 / 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 / 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>
" Change the color scheme from a list of color scheme names.
" Version 2010-09-12 from http://vim.wikia.com/wiki/VimTip341
" Press key:
" F8 next scheme
" Shift-F8 previous scheme
" Alt-F8 random scheme
" Set the list of color schemes used by the above (default is 'all'):
" :SetColors all (all $VIMRUNTIME/colors/*.vim)
" :SetColors my (names built into script)
" :SetColors blue slate ron (these schemes)
@nuc
nuc / delete-files.js
Created September 24, 2014 08:27
Delete slack files under /files/you
$('#files_list > div > a[data-file-id]').each(function(index, item){TS.files.deleteFile($(item).data('file-id'))})
@nuc
nuc / lifx.rb
Created December 14, 2014 19:47
LIFX gem wrapper
require 'rubygems'
require 'lifx'
class Lifx
attr_reader :client, :light
def initialize
@client = LIFX::Client.lan
@client.discover! do |c|

Keybase proof

I hereby claim:

  • I am nuc on github.
  • I am nuc (https://keybase.io/nuc) on keybase.
  • I have a public key whose fingerprint is 85F6 ECCA 1936 DC65 BF91 859B B7AB F0C8 4AC0 1232

To claim this, I am signing this object:

@nuc
nuc / xor-checksum-hex.js
Created March 21, 2016 09:02
XOR checksum on array of hex strings
const calculateXORChecksum = array =>
array.reduce((checksum, item) =>
checksum ^ parseInt(item, 16)
, 0).toString(16)