Skip to content

Instantly share code, notes, and snippets.

View kalupa's full-sized avatar

Paul Kalupnieks kalupa

View GitHub Profile
@kalupa
kalupa / gist:7761368
Created December 2, 2013 23:58
unbounce pgp key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: GPGTools - https://gpgtools.org
mQMuBFJF/H4RCACYSn5U9ht/IFeP9O4nSKu9iPGn17nN6YqAqJ8+N17oBHfKcFs9
Nt6/O7a9LONauWgVtIXXYGVCb4al3mRWOrK5d+0OhjwVi7dYjeqpYd5/k6wU7Kai
7o0u1Z37kzsCHzD9jh8OO00NnUudQG1kttPCV1WjFgPGI9pcGGw6JGSwQbWePtE+
HzuEcsmBdSBaz4xVbuvS74XnjL4J16NrMTgyaTRQbU0WfrscARdE5NHW2/xEPqN3
THDirCmxlqkWOzkQjFd3kkNjHcQyLQHbmy1iJswYD7TZ32S2S/suu2SjuoWbPky2
5O9fKA7PJs6lxCT8HRtpVrILd8Tr/7JXzyjDAQDBcBYVGVGG3sVgIiwbvGfLtBW2
traceroute to 69.172.155.2 (69.172.155.2), 64 hops max, 52 byte packets
1 192.168.1.1 (192.168.1.1) 0.974 ms 0.855 ms 0.908 ms
2 216-13-179-81.dedicated.allstream.net (216.13.179.81) 18.847 ms 20.254 ms 15.382 ms
3 10gigabitethernet1-3.core1.sea1.he.net (206.81.80.40) 18.271 ms 14.278 ms 22.762 ms
4 10gigabitethernet1-1.core1.yvr1.he.net (184.105.222.2) 37.086 ms 24.061 ms 14.180 ms
5 teksavvy-solutions-inc.10gigabitethernet1-4.core1.yvr1.he.net (64.71.138.206) 13.375 ms 21.396 ms 16.512 ms
6 76-10-191-42.dsl.teksavvy.com (76.10.191.42) 18.029 ms 7.845 ms 6.693 ms
7 * * *
8 69-172-155-2.cable.teksavvy.com (69.172.155.2) 15.931 ms 17.277 ms 16.174 ms
{
"eqeqeq": true,
"latedef": true,
"noarg": true,
"nonew": true,
"quotmark": true,
"undef": true,
"unused": true,
"trailing": true,
"maxdepth": 3,
@kalupa
kalupa / .vimrc
Created October 8, 2013 23:59 — forked from sdizier/.vimrc
" Strip trailing whitespace
function! <SID>StripTrailingWhitespaces()
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
%s/\s\+$//e
" Clean up: restore previous search history, and cursor position
let @/=_s
@kalupa
kalupa / commit-msg
Created October 8, 2013 17:27
Bash commit-msg hook script to prepend JIRA issue ids based on the branch name
#!/bin/bash
is_project_id()
{
project_ids=(BLOG OPS SYS IT PS PUB SS LP EX UBWEB)
found=0
for id in "${project_ids}"; do
if [[ $id == $1 ]]; then
found=1
@kalupa
kalupa / lines.rb
Last active December 21, 2015 02:28 — forked from joannou/lines.rb
attr_accessible :one,
:two,
:three,
:four,
:five,
:six,
:seven,
:eight,
:nine,
:ten,
attr_accessible :one, :two, :three, :four, :five, :six, :seven, :eight, :nine, :ten, :eleven,
:twelve, :thirteen, :fourteen, :fifteen
Started PUT "/orders/161c9a7d55d" for 127.0.0.1 at 2013-05-06 21:11:33 -0400
Processing by OrdersController#update as */*
Parameters: {"order"=>{"line_items_attributes"=>{"0"=>{"id"=>"455", "quantity"=>"2", "variant_id"=>"173"}}}, "id"=>"161c9a7d55d"}
Order Load (0.4ms) SELECT "orders".* FROM "orders" WHERE "orders"."token" = '161c9a7d55d' LIMIT 1
(0.1ms) BEGIN
LineItem Load (0.2ms) SELECT "line_items".* FROM "line_items" WHERE "line_items"."order_id" = 216 AND "line_items"."id" IN (455)
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 4 LIMIT 1
Product Load (0.5ms) SELECT "products".* FROM "products" WHERE "products"."id" = 9 LIMIT 1
CACHE (0.0ms) SELECT "products".* FROM "products" WHERE "products"."id" = 9 LIMIT 1
Image Load (0.2ms) SELECT "images".* FROM "images" WHERE "images"."product_id" = 9 ORDER BY ordering ASC
scope.states = (filter gon.states, country_id: scope.taxRate.country_id)
scope.states = state for state in gon.states when state.country_id is scope.taxRate.country_id
%input{ :name => "page_url",
:type => "text",
:placeholder => "http://YourProductSite.com",
:maxlength => 200,
:"ng-model" => "product_advanced.page_url",
:"ng-disabled" => "!product_advanced.has_landing_page",
:"ng-change" => "change(product_advanced)",
:"ng-required" => "product_advanced.has_landing_page",
:"enforce-uri-scheme" => "" }