This file contains hidden or 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
| bind "1" "slot1" | |
| bind "2" "slot2" | |
| bind "3" "slot3;+lookatweapon" | |
| bind "4" "slot4" | |
| bind "5" "slot5" | |
| bind "9" "slot9" | |
| bind "a" "+moveleft" | |
| bind "b" "buymenu" | |
| bind "v" "+voicerecord" | |
| bind "d" "+moveright" |
This file contains hidden or 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 | |
| def files | |
| results = %x{grep --include="*_create_*" -r "index: true" db/migrate -l} | |
| results.split("\n") | |
| end | |
| def display_affected_columns | |
| files.each do |file| | |
| lines = open(file){|f| f.readlines} |
This file contains hidden or 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
| // I always join CT so I add bot to T side | |
| bind "ç" "bot_add t" | |
| // **MUST HAVE BOT IN SERVER** - bind a key to place a bot | |
| bind "à" "bot_place" | |
| // Press this once to get all nades after round restarts | |
| bind "^" "give weapon_hegrenade;give weapon_flashbang;give weapon_smokegrenade;give weapon_molotov;sv_infinite_ammo 1" | |
| // Press this to enable noclip |
This file contains hidden or 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
| # binding to look like vim | |
| set-window-option -g mode-keys vi | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| ## set title to tmux | |
| #set -g set-titles on | |
| #set -g set-titles-string 'tmux' |
This file contains hidden or 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 Ball | |
| attr_reader :x, :y, :angle, :speed | |
| SIZE = 16 | |
| def initialize | |
| @x = Pong::WIDTH/2 | |
| @y = Pong::HEIGHT/2 | |
| @angle = rand(120) +30 | |
| @angle *= -1 if rand > 0.5 |
This file contains hidden or 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
| # finished level6 | |
| class Player | |
| def play_turn(warrior) | |
| @warrior = warrior | |
| action | |
| save_health | |
| end | |
| def side | |
| if wall_behind? |
This file contains hidden or 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/env ruby | |
| require 'find' | |
| require 'pdf-reader' | |
| Dir.chdir "#{Dir.pwd}/pdf" | |
| Find.find('./') do |path| | |
| if path.match /\.pdf/ | |
| File.open path, "rb" do |io| | |
| content = "" |
This file contains hidden or 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
| ( x=`tput op` y=`printf %$((${COLUMNS}-6))s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done; ) |
This file contains hidden or 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
| alias prodip="cat config/deploy/production.rb | grep -o '[0-9.]*' | xclip -selection 'clipboard'" |
This file contains hidden or 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
| sudo apt-get --purge remove xserver-xorg-video-nouveau | |
| sudo apt-get install linux-headers-`uname -r` | |
| sudo apt-add-repository ppa:ubuntu-x-swat/x-updates | |
| sudo apt-get update | |
| sudo apt-get install nvidia-current | |
| sudo update-alternatives --config gl_conf | |
| sudo update-alternatives --config x86_64-linux-gnu_gl_conf | |
| sudo ldconfig | |
| sudo update-initramfs -u | |
| sudo nvidia-xconfig |
NewerOlder