This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Devise | |
module Models | |
module TwitterOauth | |
extend Devise::Twitter | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#modified script version from the.helped comment posted here: http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/ | |
#!/bin/bash | |
echo 'You are currently running: '`uname -r` | |
echo 'The following kernel images exist in /boot:' | |
ls /boot|grep vmlinuz|cut -d'-' -f2,3 | |
nKerns=`ls /boot|grep vmlinuz|wc -l` | |
if [ $nKerns -gt 1 ] | |
then | |
# Ok to remove the oldest ONE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in `find /home/foo/ -nouser` | |
do | |
echo $file | |
chown <NEW_OWNER>:<NEW_GROUP> $file | |
done | |
echo 'complete' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
here=$PWD | |
echo "**********************************************" | |
for folder in ./* | |
do | |
echo "pulling from $folder" | |
echo "**********************************************" | |
cd "$here" && cd "$folder" && git pull origin | |
echo "**********************************************" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'active_support/core_ext' | |
chars = (('a'..'z').to_a + ('A'..'Z').to_a) | |
time = Time.now.beginning_of_month | |
twelve_hours_from_now = 12.hours.from_now | |
end_of_next_month = 1.month.from_now.end_of_month |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Version: 0.1 | |
# Description: This script has a dependancy with members package | |
# Tested only on Ubuntu | |
# | |
# todo: | |
# - test members package existance with which output | |
# - get rid of members dependancy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc | |
# tab-completion for git subcommands | |
# (this is for git installed via MacPorts: `sudo port install git-core +svn`) | |
#source /usr/local/Cellar/git/1.7.6/etc/bash_completion.d/git-completion.bash | |
# git status with a dirty flag | |
function __git_status_flag { | |
git_status="$(git status 2> /dev/null)" | |
remote_pattern="^# Your branch is (.*) of" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreatePlaces < ActiveRecord::Migration | |
# Rails migration for GeoWorldMap db into postgresql db | |
#(inspired by http://blog.inspired.no/populate-your-database-with-free-world-cities-countries-regions-in-2-minutes-using-a-rails-migration-273/ post) | |
#extract files from GeoWorldMap.zip archive from here | |
# http://www.geobytes.com/GeoWorldMap.zip | |
# | |
#and place them into #{Rails.root}/db/migrate/ | |
##the archive has 'cities.txt' file, rename it 'Cities.txt' | |
#mv cities.txt Cities.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
counter = 1 | |
if File.exists?('/usr/share/i18n/SUPPORTED') | |
FileUtils.copy_file('/usr/share/i18n/SUPPORTED','/tmp/lang_list.txt') unless File.exists?('/tmp/lang_list.txt') | |
file = File.open("/tmp/lang_list.txt", "r") | |
file_export = File.new("/tmp/lang_export.txt", "w+") | |
lang_set = Hash.new | |
output_list = "" | |
while (line = file.gets) | |
puts "#{counter}: #{line}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background no | |
font Sans:size=8 | |
#xftfont Sans:size=10 | |
use_xft yes | |
xftalpha 0.9 | |
update_interval 3.0 | |
total_run_times 0 | |
own_window yes | |
own_window_type normal | |
own_window_transparent yes |
OlderNewer