Skip to content

Instantly share code, notes, and snippets.

View developerinlondon's full-sized avatar
🙂
BizOps

Wizard Supreme of AI and Automation - Nayeem Syed developerinlondon

🙂
BizOps
View GitHub Profile
@developerinlondon
developerinlondon / translator.rb
Created July 16, 2013 12:11
translator to translate to japanese using google translate. place this script in rails root folder. run translator.rb en ja
#!/usr/bin/env ruby
if ARGV.size != 2
puts "Usage: #{$0} <from_language> <to_language>"
exit -1
end
require 'rubygems'
require 'ya2yaml' # this gem is needed for this to work!
require 'yaml'
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@developerinlondon
developerinlondon / nicegit.sh
Last active December 22, 2015 05:39
bash prompt for nice git info
###############################################################################
# IDENTIFICATION OF LOCAL HOST: CHANGE TO YOUR COMPUTER NAME
###############################################################################
PRIMARYHOST="localhost"
###############################################################################
# PROMPT
###############################################################################
@developerinlondon
developerinlondon / bashrc
Created September 6, 2013 12:25
my bashrc file with funky colors.
# enable color support of ls and also add handy aliases
source ~/.rvm/scripts/rvm
alias ls='ls -hGFp'
alias dir='ls -hGFp'
alias vdir='ls -hGFp'
alias g='git'
complete -o default -o nospace -F _git g
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#
# USAGE:
@developerinlondon
developerinlondon / sublime.sh
Last active August 29, 2015 13:55
adding sublime link
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl
@developerinlondon
developerinlondon / sublime_color_code.sh
Created February 3, 2014 14:17
Sublime Color Code
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone https://github.com/Xavura/CoffeeScript-Sublime-Plugin.git CoffeeScript
curl -sSL https://get.rvm.io | bash
@developerinlondon
developerinlondon / installing_java_7
Created February 5, 2014 15:52
installing java 7
1. download new java from oracle site:
https://java.com/en/download/installed.jsp
2. unlink the symlink of java then link to the new location:
sudo rm /usr/bin/java
sudo ln -s /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin/java
3. update the environment variable by adding this to .bashrc:
export JAVA_HOME='/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home'
@developerinlondon
developerinlondon / 0_reuse_code.js
Created April 7, 2014 09:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console