Skip to content

Instantly share code, notes, and snippets.

Brian Smith Lytol

Block or report user

Report or block Lytol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Pok3r Configuration.md

Pok3r Custom Mapping

DIP switch config for QWERTY with Caps Lock FN

1: off
2: off
3: on
4: off
@Lytol
Lytol / selection_sort.scala
Created Nov 4, 2009
Selection sort implementation in Scala
View selection_sort.scala
// Inmperative version
//
def selectionSort(list: Array[Int]): Unit {
def swap(list: Array[Int], i: Int, j: Int) {
var tmp = list(i)
list(i) = list(j)
list(j) = tmp
}
var i = 0
@Lytol
Lytol / ultemplate.rb
Created Sep 23, 2010
Rails 3 Application Template
View ultemplate.rb
# Rails application template for Rails 3 + Postgres + Git + haml + JQuery + Rspec + Cucumber + Capybara + FactoryGirl
# by Brian Smith <bsmith@swig505.com>
# Create a default README
file "README.md", <<-EOF
#{app_name}
#{"=" * app_name.length}
TODO: description
@Lytol
Lytol / IRSSI Cheat Sheet.md
Last active Dec 29, 2017
IRSSI Cheat Sheet
View IRSSI Cheat Sheet.md

General

  • /quit – Quit IRSSI

Windows

  • option+# – Navigate to specified window
  • ctrl-n – Navigate to next window
  • ctrl-p – Navigate to previous window
View gist:45845
# Rails template for a basic project assuming the following:
#
# - MySQL for the DB
# - Git for version control
#
# Example: rails myapp -d mysql -m RailsTemplate.rb
#
# Author: Brian Smith (bsmith@swig505.com)
#
# Actions:
@Lytol
Lytol / layer1.kll
Created Apr 21, 2015
Lytol's Keyboard Layout for Infinity Keyboard
View layer1.kll
Name = Layer1;
Version = 0.1.0;
Author = "Brian Smith <brian.e.smith@gmail.com";
KLL = 0.3;
# Modified Date
Date = 2015-03-05;
# Number row
@Lytol
Lytol / csgo.md
Last active Dec 28, 2015
Counter-Strike:GO Server
View csgo.md

Game Modes

  • Classic Casual - game_type 0 game_mode 0
  • Classic Competitive - game_type 0 game_mode 1
  • Arms Race - game_type 1 game_mode 0
  • Demolition - game_type 1 game_mode 1
  • Deathmatch - game_type 1 game_mode 2

General

@Lytol
Lytol / gist:5015688
Last active Dec 14, 2015
Beginner's Guide to Vim
View gist:5015688
View appconfig.rb
require 'yaml'
module MyRailsApp
module Config
extend self
def [](key)
hash[key.to_sym]
end
@Lytol
Lytol / gist:1065962
Created Jul 5, 2011
Body tag helper that sets class and id based on controller/action
View gist:1065962
def body_tag(&blk)
controller_name = controller.class.to_s.underscore.gsub(/_controller$/, '').gsub(/\//,'_')
action_name = controller.action_name.underscore.gsub(/_/,'-')
content_tag(:body, :id => "#{controller_name}-#{action_name}", :class => controller_name, &blk)
end
You can’t perform that action at this time.