Skip to content

Instantly share code, notes, and snippets.

@pitr
pitr / Makefile
Last active May 2, 2021 16:38 — forked from HeinrichHartmann/Makefile
Search Sum Exercise in x86-Assembly
main: main.c lib.asm
nasm -f macho64 lib.asm
$(CC) -O3 -o main lib.o main.c
run: main
./main
@pitr
pitr / Gemfile
Last active November 29, 2022 04:32
source 'https://rubygems.org'
gem 'fluentd'
gem 'fluent-plugin-elasticsearch'
gem 'ruby-prof'
@pitr
pitr / README.md
Last active September 7, 2016 17:39
Block Facebook Newsfeed with Adblock

Hide Facebook newsfeed with Adblock

Adopted from CSS from this project - https://github.com/maxfriedrich/quiet-facebook

  1. Get Chrome
  2. Get AdBlock Plus
  3. Add this feed url - https://gist.githubusercontent.com/pitr/78d78b0b24f964f0625f/raw/adblock-facebook-newsfeed.txt
@pitr
pitr / gist:8242ac5253a72ddf3838
Last active August 29, 2015 14:00
gbr - Open PR with current branch in bitbucket
gbr() {
originurl=$(git config --get remote.origin.url | tr '[:upper:]' '[:lower:]')
originurl=${originurl/git\@bitbucket\.org\:/https://bitbucket.org/}
originurl=${originurl/\git:/https:}
originurl=${originurl/\.git/}
path=$(git config --get remote.origin.url | tr '[:upper:]' '[:lower:]' | sed -e 's/git@bitbucket.org://')
branchName=$(git rev-parse --abbrev-ref HEAD)
giturl=$originurl"/pull-request/new?source="$path"::"$branchName
@pitr
pitr / keybase.md
Last active August 29, 2015 13:57

Keybase proof

I hereby claim:

  • I am pitr on github.
  • I am pitr (https://keybase.io/pitr) on keybase.
  • I have a public key whose fingerprint is 0C3C CD9F 0421 326F 35E7 63D8 1E96 7084 40DA AD9A

To claim this, I am signing this object:

@pitr
pitr / newrelic.rb
Created August 19, 2013 20:57
newrelic plugin for websocket rails
module NewRelic
module Agent
module Instrumentation
module WebsocketRails
module ActionController
def self.newrelic_write_attr(attr_name, value) # :nodoc:
write_inheritable_attribute(attr_name, value)
end
def self.newrelic_read_attr(attr_name) # :nodoc: