Skip to content

Instantly share code, notes, and snippets.

View anildigital's full-sized avatar

Anil Wadghule anildigital

  • Pune, India
  • 10:18 (UTC +05:30)
View GitHub Profile
@ryankennedy
ryankennedy / Audited.java
Created September 24, 2013 17:48
Example of adding audited REST endpoints to a Dropwizard service.
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Audited {
}
@missingfaktor
missingfaktor / gist:6018320
Last active December 19, 2015 21:09
Easing the use of EmbeddedDocument pattern in Ruby
require 'json'
require 'date'
# Embedders
def scalar
lambda { |x| x }
end
def date
@jkresner
jkresner / test-passport.coffee
Created June 20, 2013 17:50
Passport.js user mocking version 2
users = require './../data/users'
data = users: []
data.users.anon = authenticated: false
data.users.admin = users[0]
data.users.jk = users[1]
data.users.artle = users[5]
data.users.beountain = users[4]
setSession = (userKey) ->
@aaronbuchanan
aaronbuchanan / gist:5341619
Created April 8, 2013 23:47
UI/UX OmniGraffle Stencils
A bunch of stenciles for wireframing, data & user flow diagrams and more:
Empty Chrome Browser Window:
https://www.graffletopia.com/stencils/938
Twitter Bootstrap UI:
https://www.graffletopia.com/stencils/934
Google Web GUI:
https://www.graffletopia.com/stencils/10431
@mutewinter
mutewinter / Alfred 3 Workflows.md
Last active November 25, 2020 14:14
A list of Alfred 3 workflows I'm using.
@SlexAxton
SlexAxton / .zshrc
Last active June 6, 2025 19:18
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@searls
searls / japan_guide.md
Last active June 27, 2025 13:20
Japanese Travel Survival Guide

Japanese Travel Survival Guide

Update 8/16/2015: I updated this guide a bit and posted it to Medium

A few notes about things I do when I travel to Japan.

Survival

Travel light

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

system ~/projects/jruby $ time java HelloWorld
Hello, world!
real 0m0.098s
user 0m0.087s
sys 0m0.022s
system ~/projects/jruby $ time java HelloWorld
Hello, world!
@conikeec
conikeec / ScalaEnsime
Created May 4, 2012 18:56
Scala Ensime Setup
Recently I’ve become disillusioned with the state of the JVM IDE: I haven’t touched Eclipse in anger in 3 years, and have no intention to do so anytime soon. IntelliJ on the other hand has served me decently, but suffers from too many odd bugs when dealing with Scala code to not be a minor nuisance in my workflow. Not only that, “modern” IDE’s are massive workspace hogs: try working with IntelliJ without at least a 1920x1200 resolution screen.
For these reasons, I’ve decided to try using Emacs for development for a month or so to see how it compares, and so far, so good.
Setting Up Emacs for Scala Development
Setting up Emacs for Scala development is fairly easy, just do the following:
Create a folder called ~/.emacs.d/scala-mode (in your home folder). You might already have an .emacs.d folder there, if not, create it.
Copy all contents from $SCALA_HOME/misc/scala-tool-support/emacs into ~/.emacs.d/scala-mode. I found that this folder is missing in the latest Scala 2.9.2 distribution, but you can get it from