Skip to content

Instantly share code, notes, and snippets.

@gaza3g
gaza3g / hack.sh
Created March 31, 2012 18:16 — forked from erikh/hack.sh
OSX For Hackers, Gazza Version
#!/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/2267306/hack.sh | sh
#
@gaza3g
gaza3g / .gitignore
Created April 12, 2012 01:58 — forked from ErikEvenson/.gitignore
Xcode 4 .gitignore file
.DS_Store
*.swp
*~.nib
build/
*.pbxuser
*.perspective
*.perspectivev3
@gaza3g
gaza3g / seed_generator.rb
Created August 18, 2012 11:01
Generate users, fire events and populate the site using Capybara and Faker gems.
# Author: Gazza | gazaly(at)gmail(dot)com
# Notes:
# Simulate a variety of user-actions for Stacked ( http://code.google.com/p/stacked/ )
# Dependencies:
# $ gem install capybara faker
require 'rubygems'
require 'capybara'
require 'capybara/dsl'
require 'faker'
@gaza3g
gaza3g / sql_server_schema.sql
Created September 22, 2012 05:52
StackUnderflow schema converted for MS SQL Server
USE [stackunderflow]
GO
/****** Object: User [stackunderflow] Script Date: 9/22/2012 1:50:52 PM ******/
CREATE USER [stackunderflow] FOR LOGIN [stackunderflow] WITH DEFAULT_SCHEMA=[stackunderflow]
GO
ALTER ROLE [db_owner] ADD MEMBER [stackunderflow]
GO
ALTER ROLE [db_securityadmin] ADD MEMBER [stackunderflow]
GO
/****** Object: Table [dbo].[answers] Script Date: 9/22/2012 1:50:52 PM ******/
@gaza3g
gaza3g / redmine_installation.sh
Created October 2, 2012 01:53
Redmine Installation Steps
Steps to take when installing redmine
- Download XCode and then go to => Preferences => Install CommandLine Tools (or download the cmd line tools without instaling XCode from apple site)
- sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2 #fixes error when bundler tries to install json
- Install homebrew
- brew install mysql
@gaza3g
gaza3g / ubuntu_redmine_setup.bash
Created October 20, 2012 02:13
Ubuntu server setup with Redmine
# wget -O - https://raw.github.com/gist/3921725/ubuntu_redmine_setup.bash | bash
#add user gazza
adduser gazza
#add new user to list of sudoers
adduser gazza sudo
#now logout and re-login as gazza
@gaza3g
gaza3g / gist:4000303
Created November 2, 2012 11:17
git svn access
#from http://stackoverflow.com/questions/3777075/https-github-access/4454754#4454754
env GIT_SSL_NO_VERIFY=true git clone https://github...
git config --global http.sslVerify false
export GIT_SSL_NO_VERIFY=true
#from http://viget.com/extend/effectively-using-git-with-subversion
git-svn clone s http://example.com/my_subversion_repo local_dir
git-svn rebase
@gaza3g
gaza3g / gist:4006528
Created November 3, 2012 08:09
remove apache and sendmail mta auto start
sudo update-rc.d -f apache2 remove
sudo update-rc.d sendmail disable
rails s -e production -p 80
@gaza3g
gaza3g / gist:4015718
Created November 5, 2012 07:00
spotify in Messages.app status
#taken from user "pinyourwings22"
#at http://forums.macrumors.com/showthread.php?t=1418925
on idle
tell application "Spotify"
set theTrack to current track
set theArtist to artist of theTrack
set theName to name of theTrack
if player state is playing then
set playStatus to "playing"
@gaza3g
gaza3g / yosemite-clean-setup.sh
Last active August 29, 2015 14:07
My Yosemite post-install automated settings script
###############################################################################
# Override system defaults #
###############################################################################
echo "Turn off the character accent selector and re-enable key repetition"
defaults write -g ApplePressAndHoldEnabled -bool false
echo "Case-insensitive tab completion in terminal"
echo "set completion-ignore-case On" >> ~/.inputrc