Skip to content

Instantly share code, notes, and snippets.

View LBRapid's full-sized avatar
🏠
Working from home

John Dyer LBRapid

🏠
Working from home
View GitHub Profile
export PATH=$PATH:/opt/local/bin
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
export PATH=$PATH:.
export PATH=/usr/bin/:$PATH
export PATH=~/bin/:$PATH
@LBRapid
LBRapid / autoexec.cfg
Created March 18, 2023 09:05
New CSGO autoexec
// budi's CS:GO config
// Competitive HUD from http://www.spddl.de/csgo/hud/competitivehud
// Rates
rate "128000"
cl_cmdrate "128"
cl_updaterate "128"
cl_interp "0.0"
cl_interp_ratio "1"
cl_lagcompensation "1"
@LBRapid
LBRapid / autoexec.cfg
Last active September 9, 2017 07:09
CSGO
// budi's CS:GO config
// Competitive HUD from http://www.spddl.de/csgo/hud/competitivehud
// Rates
rate "128000"
cl_cmdrate "128"
cl_updaterate "128"
cl_interp "0.0"
cl_interp_ratio "1"
cl_lagcompensation "1"
@LBRapid
LBRapid / keypress.rb
Created September 21, 2012 18:03
Simulate keyup event in a request spec with capybara/poltergeist
keypress_script = "var e = $.Event('keyup', { keyCode: 13 }); $('#main-search-input').trigger(e);"
page.driver.execute_script(keypress_script)
class ClipartDiagnoser
def call
CSV.open("/u01/app/jsLab_server/current/tmp/clipart_designs.csv", "wb") do |csv|
csv << ["design_id"]
Design.where(updated_at: (Time.now - 24.hours)..Time.now).find_each do |design|
xml = Nokogiri::XML(design.content)
clipart = xml.xpath("//icon[@grayscale='none' and @type='IMAGE']")
if clipart.present?
class Something
attr_accessor :groups
def initialize
@groups = []
end
def respond_to_missing?(method_sym, include_private = false)
@groups.map(&:name).detect { |name| name == method_sym.to_s }
end
require 'capybara_helper'
class LabPrintSaveTest < ActionDispatch::IntegrationTest
it 'save a design through print' do
stub_rack_proxy
insert_cassette 'capybara_lab_print_save'
visit_empty_lab
click_link 'add text'
require 'capybara_helper'
class LabPrintSaveTest < ActionDispatch::IntegrationTest
it 'save a design through print' do
stub_rack_proxy
insert_cassette 'capybara_lab_print_save'
visit_empty_lab
click_link 'add text'
IGNORED = [
/The "fb-root" div has not been created/,
/Unsafe JavaScript attempt to access frame/,
/in the list of allowed domains for kit/
].freeze
@LBRapid
LBRapid / .cvimrc
Last active January 29, 2016 23:48
My cVimrc File
" Settings
set hud
set nosmoothscroll
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"
set nocncpcompletion