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 / gist:1229418
Created September 20, 2011 15:31 — forked from jnx/gist:1229355
Node.js Campfire bot
// main app.js
var client = require('ranger').createClient('ROOM',
'SECRET');
var timestamp = require('./timestamp').timestamp;
var getWeatherWrapper = require('./weather').getWeatherWrapper;
var showMap = require('./map').showMap;
var getTweets = require('./tweets').getTweets;
client.room(ROOMID, function(room) {
@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)
@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 / 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 / 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 / .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 / WhyDidYouUpdate.js
Last active December 3, 2017 19:05 — forked from joshma/WhyDidYouUpdateMixin.js
WhyDidYouUpdate Higher Order Component
/* eslint-disable no-console */
import React, { Component } from 'React'
import _ from 'lodash'
/*
* Drop this mixin into a component that wastes
* time according to Perf.getWastedTime() to find
* out what state/props should be preserved. Once it
* says "Update avoidable!" for {state, props},
* you should be able to use shouldComponentUpdate.
@nuc
nuc / plaintext-contenteditable.css
Last active April 18, 2019 01:24 — forked from Schniz/plaintext-contenteditable.css
Plain-Text ContentEditable div for React.js
.comPlainTextContentEditable {
-webkit-user-modify: read-write-plaintext-only;
}
.comPlainTextContentEditable--has-placeholder::before {
content: attr(placeholder);
opacity: 0.5;
color: inherit;
cursor: text;
}