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 |
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/sh -x | |
# | |
# found here: http://askubuntu.com/a/592127 | |
# | |
cd /usr/lib/vmware-tools/modules/source | |
tar xf vmhgfs.tar | |
grep -q d_u.d_alias vmhgfs-only/inode.c && echo "already patched" && exit 0 | |
sed -i -e s/d_alias/d_u.d_alias/ vmhgfs-only/inode.c | |
cp -p vmhgfs.tar vmhgfs.tar.orig | |
tar cf vmhgfs.tar vmhgfs-only |
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
# found here: | |
# http://stackoverflow.com/a/28680027/1488217 | |
set_trace_func proc { | |
|event, file, line, id, binding, classname| | |
if event == "call" && caller_locations.length > 500 | |
fail "stack level too deep" | |
end | |
} |
OlderNewer