Skip to content

Instantly share code, notes, and snippets.

View anildigital's full-sized avatar
:octocat:

Anil Wadghule anildigital

:octocat:
View GitHub Profile
@henrik
henrik / Plex Toggle.scpt
Created November 21, 2009 23:28
Start Plex if not running. Make fullscreen if running windowed. Quit if running fullscreen.
-- Start Plex if not running. Make fullscreen if running windowed. Quit if running fullscreen.
-- By Henrik Nyh <http://henrik.nyh.se> 2009-11-22 under the MIT License.
-- Some code from http://forums.plexapp.com/index.php?/topic/8325-applescript-focusfullscreen-plex/
tell application "Plex"
-- "if it is running" is probably Snow Leopard only.
if it is running then
tell application "System Events" to tell process "Plex"
set isFullscreen to position of window 1 is {0, 0}
anonymous
anonymous / check_emacs.sh
Created December 29, 2009 02:42
emacs -q --eval '(condition-case err (progn (load "~/.emacs") (kill-emacs 0)) (error (kill-emacs 1)))'
# Source http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/bed5b2bd8b237f5a?pli=1
@mislav
mislav / _notes.md
Created December 29, 2009 12:12
Install MongoDB using Homebrew and set it up for your user on OS X

This gist is outdated

Homebrew people have since included this in a recipe.

$ brew update
$ brew install mongodb

( follow the instructions given )

@minimal
minimal / jetty.clj
Created January 20, 2010 01:17
Websockets with clojure + jetty
;; Copyright (c) James Reeves. All rights reserved.
;; The use and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which
;; can be found in the file epl-v10.html at the root of this distribution. By
;; using this software in any fashion, you are agreeing to be bound by the
;; terms of this license. You must not remove this notice, or any other, from
;; this software.
(ns compojure.server.jetty
"Clojure interface to start an embedded Jetty server."
@defunkt
defunkt / license
Created January 27, 2010 10:25
license bash script
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
#!/bin/sh
echo "Copyright (c) `date +%Y` Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
require 'rubygems'
require 'spoon'
Spoon.spawnp 'jruby', *ARGV
This is an example of using RVM's Project .rvmrc file
to have it automatically bootstrap your environment, including bundler.
This could be further expanded to do anything you require :)
The important thing to remember is that the purpose of these files is
to allow you to very easily have your 'project context' (aka 'environment')
loaded automatically for you when you enter the project in the shell (cd).
You can generate the .rvmrc file below by running:
(add-to-list 'load-path "~/.emacs.d/")
(require 'rainbow-parens)
;; clojure-mode
(add-to-list 'load-path "~/Projekt/clojure-mode")
(require 'clojure-mode)
;; swank-clojure
(require 'assoc)
@nicobrevin
nicobrevin / gist:460263
Created July 1, 2010 17:26
jsvc-daemon
#! /bin/sh
# Generic script for running ruby scripts as daemons using
# jsvc and a java class to control the daemon.
#
# Contains common parameters and start/stop
# Things you'll need to set on a per script/daemon basis:
# SCRIPT_NAME
#
# Things you can set: