Skip to content

Instantly share code, notes, and snippets.

View rays's full-sized avatar

Ray Slakinski rays

View GitHub Profile
@rays
rays / keybase.md
Last active November 21, 2017 01:39

Keybase proof

I hereby claim:

  • I am rays on github.
  • I am rslakinski (https://keybase.io/rslakinski) on keybase.
  • I have a public key ASASTjo0rEEwJ81kPxuu5HAO2g6O-DhyPbuJ2510hjfMPQo

To claim this, I am signing this object:

import fuzzyhashlib
sample_a = "a" * 1024
sample_b = "a" * 1024
sample_c = "c" * 1024
hash_ss_a = fuzzyhashlib.ssdeep(sample_a)
hash_ss_b = fuzzyhashlib.ssdeep(sample_b)
hash_ss_c = fuzzyhashlib.ssdeep(sample_c)
@rays
rays / mutt.rb
Last active August 2, 2017 19:16
Mutt 1.5.22 with patches
require 'formula'
class Mutt < Formula
homepage 'http://www.mutt.org/'
url 'ftp://ftp.mutt.org/mutt/devel/mutt-1.5.22.tar.gz'
sha1 '728a114cb3a44df373dbf1292fc34dd8321057dc'
head do
url 'http://dev.mutt.org/hg/mutt#HEAD', :using => :hg
@rays
rays / cronjob.sh
Created October 21, 2013 18:59 — forked from memonic/cronjob.sh
#!/bin/bash
(/usr/local/bin/db2log | \
mk-query-digest --fingerprints \
--filter '$event->{user} !~ m/^(bi|memonic)$/') 2>&1 | \
mail -s "MySQL slow logs" root
# Rotate slow logs. Will move them into the backup table slow_log_backup. If
# that table exists it's overwritten with the primary slow log.
# So with this strategy we can still access yesterday's slow log by querying
# slow_log_backup.
# Sidebar Patch --------------------------------------
set sidebar_delim = ' '
set sidebar_visible = yes
set sidebar_shortpath = yes
#set sidebar_folderindent = yes
set sidebar_width = 35
macro index b '<enter-command>toggle sidebar_visible<enter>'
macro pager b '<enter-command>toggle sidebar_visible<enter>'
#
# Author:: Adam Jacob (<adam@opscode.com>)
# Author:: Seth Chisamore (<schisamo@opscode.com>)
# Copyright:: Copyright (c) 2010-2011 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@rays
rays / mp3get.py
Created November 20, 2012 21:28
first_quest_mp3_download.py
from lxml.html import parse
import requests
url = 'http://propertyistheft.net/files/D&D/Mystara/Adventures/tsr01105%20-%20AD&D%202E%20-%20Mystara%20-%20First%20Quest%20-%20Intro%20to%20AD&D%20(with%20Audio%20CD)/tsr1105_AD&D_-_First_Quest_-_Audio_CD/'
dom = parse(url).getroot()
links = dom.cssselect('a')
for link in links:
if link.values() and '.mp3' in link.values()[0]:
@rays
rays / github_issues_to_csv_v3.rb
Created September 28, 2012 10:27 — forked from kevinpschaaf/github_issues_to_csv_v3.rb
Exports Github issues to CSV (API v3)
require 'octokit'
require 'csv'
require 'date'
# Description:
# Exports Github issues from one or more repos into CSV file formatted for import into JIRA
# Note: By default, all Github comments will be assigned to the JIRA admin, appended with
# a note indicating the Github user who added the comment (since you may not have JIRA users
# created for all your Github users, especially if it is a public/open-source project:
#
@rays
rays / github_issues_to_csv_v3.rb
Created September 28, 2012 10:27 — forked from kevinpschaaf/github_issues_to_csv_v3.rb
Exports Github issues to CSV (API v3)
require 'octokit'
require 'csv'
require 'date'
# Description:
# Exports Github issues from one or more repos into CSV file formatted for import into JIRA
# Note: By default, all Github comments will be assigned to the JIRA admin, appended with
# a note indicating the Github user who added the comment (since you may not have JIRA users
# created for all your Github users, especially if it is a public/open-source project:
#
@rays
rays / gist:1886812
Created February 22, 2012 19:34 — forked from axelav/gist:1839777
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt