Skip to content

Instantly share code, notes, and snippets.

View sysprv's full-sized avatar

Ishan Oshadi Jayawardene sysprv

View GitHub Profile
@sysprv
sysprv / dkm.md
Created December 9, 2019 14:44
D. Keith Mano: How to Keep from Getting Mugged

Learn to walk gas-fast. Book it, baby: Lay a big batch behind. Not in panic, mind you: never run. A power-purposeful, elbow-out, crazy kind of stride. The way people moved in old silent films—you know, right before thev fell into an open manhole. Wave one hand now and then, as if you'd just seen three armed friends and were about to hail a cab. Your attitude should be: "Busy signal, dit-dit-dit. Can't fit you in today, fellas. Catch me tomorrow." In a real halfway-house neighborhood, walk dead street center: follow that white line; avoid ambush cover. Who's gonna mug you when he might get hit by a truck while doing it? Oh, you should see me squeeze out sneaker juice: I am Rapid City: I have no staying

set backup " http://stackoverflow.com/a/26779916/1183357
" some constants related to backups
let s:home = expand('~')
let s:hostname = hostname()
let s:backup_root = s:home . '/.backup/' . s:hostname
lockvar s:home s:hostname s:backup_root
if !isdirectory(s:backup_root)
call mkdir(s:backup_root, 'p')
endif
Dig Those Sunsets, Pony - Hanif Abdurraqib
https://www.youtube.com/watch?v=tRZxQFhBSuw
so i'm on this plane.
but i don't really do heights, right,
like, freshman year in college, i damn near flunked out
first semester fucking with the top bunk in my dorm
i just laid there the whole time
in this blanket fort i made
Adblock Plus
Element Hiding Helper for Adblock Plus
Custom Tab Width
Google Redirects Fixer
OneTab
Pure URL
ScrapBook
Session manager
Tabs Menu
Toggle Proxy

Keybase proof

I hereby claim:

  • I am sysprv on github.
  • I am sysprv (https://keybase.io/sysprv) on keybase.
  • I have a public key whose fingerprint is BDF2 38E5 0079 F199 3419 1621 36E6 5835 5B1F 3959

To claim this, I am signing this object:

@sysprv
sysprv / homework.py
Last active August 29, 2015 13:59
Count the shift in the garage after a car departs as movements
garage_lane = [] # queue
garage_capacity = 10
waiting = [] # queue
movements = [] # list using plate number to count movements
def movement_count(plate_number):
count = 0
for p in movements:
if p == plate_number:
count += 1
@sysprv
sysprv / xsd-w3c-dom-ns.rb
Created September 24, 2012 12:00
Java JAXP W3C DOM API usage from JRuby
require 'java'
java_import 'javax.xml.parsers.DocumentBuilder'
java_import 'javax.xml.parsers.DocumentBuilderFactory'
java_import 'java.io.FileInputStream'
xsdfn = "/wherever/thing.xsd"
docbuilderfactory = DocumentBuilderFactory.newInstance()
docbuilderfactory.setNamespaceAware(true)
docbuilder = docbuilderfactory.newDocumentBuilder()
@sysprv
sysprv / gist:2408729
Created April 17, 2012 20:16
About Picbox

Hi Barrett,

I'm a Picbox user. Nice little app, thanks for making it! I have one "issue" and one question...

Issue: The thumbnail display while adding to dropbox has a fixed size - when it shows square photos taken by Instagram (for example) the thumbnail appears stretched. Is it possible for you to read the image attributes and resize the thumbnail display properly?

Question: The UUID/GUID that's used as the filename on Dropbox - where's that from? Do you generate it or does Dropbox or iOS give it to you?

Thanks! io;

require 'jruby'
# java.lang.System.getProperty("java.runtime.version") == "1.6.0_30-b12"
java_import 'java.security.KeyPairGenerator'
java_import 'java.security.SecureRandom'
module PKI
KEYPAIR_TYPE = 'DSA'
KEYPAIR_IMPL = 'SUN'