Skip to content

Instantly share code, notes, and snippets.

View larrybolt's full-sized avatar

Larry Boltovskoi larrybolt

  • Orsa
View GitHub Profile
@larrybolt
larrybolt / init.sh
Created May 10, 2014 23:48
symlink everything from /Volumes/Data/larrybolt/*/* to ~/
#!/bin/sh
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# get all files and folders in the folder where this script is
for dir in $(ls $BASEDIR); do # loop trough each of them
if [ -d $dir ]; then # the file is a folder
if [ -d ~/$dir ]; then # it exists in our home folder as well
echo "$dir"
if [ -L ~/$dir ]; then
echo " - $dir is already symlinked!"
else

Keybase proof

I hereby claim:

  • I am larrybolt on github.
  • I am larrybolt (https://keybase.io/larrybolt) on keybase.
  • I have a public key whose fingerprint is 3204 3CB8 9587 0598 13DA 2052 C978 A72D 8104 7E0C

To claim this, I am signing this object:

@larrybolt
larrybolt / vimgolf.user.js
Created October 30, 2014 23:32
Vimgolf user script
// ==UserScript==
// @name Vimgolf challenge duplicate filter
// @namespace http://lry.be
// @contact larry.bolt@gmail.com
// @version 0.2
// @description Filtering duplicate entries and displaying the total unique entries at vimgolf
// @include http://vimgolf.com/challenges/*
// @include http://www.vimgolf.com/challenges/*
// ==/UserScript==
import xbmc, xbmcgui, xbmcaddon, xbmcvfs
import re
import sys, os
import unicodedata
import time
import sqlite3
import mysql.connector
import buggalo
buggalo.GMAIL_RECIPIENT = "msahadl60@gmail.com"
@larrybolt
larrybolt / app.js
Created June 12, 2015 21:22
Small test of displaying data from the WakaTime api on a pebble app
/**
* Welcome to Pebble.js!
*
* This is where you write your app.
*/
var UI = require('ui');
var Vector2 = require('vector2');
var ajax = require('ajax');
@larrybolt
larrybolt / debug.jsp
Created June 13, 2015 21:15
Java Server Page Fragment with some debug info
<%@page import="java.util.Enumeration" %>
<div class="debug">
<%= request.getMethod() %>
<%= request.getRequestURI() %>
</div>
<div class="debug">
request.Attributes:
<ul>
<% for (Enumeration<String> e = request.getAttributeNames(); e.hasMoreElements();){
String El = e.nextElement();
@larrybolt
larrybolt / example.js
Created October 11, 2015 17:43
Data mining on torfs
// https://www.torfs.be/damesschoenen/+merk=fred-perry
/* search source code for the products
<article class="product thumb">
<a href="/fred-perry-blauwe-slip-on-155138" data-product_id="155138" data-product_brand="{brand}" data-product_cat="damesschoenen" data-product_price_bare="59.95" >
<div class="img">
<img src="https://3.assets.torfs.be/products/155138/fred-perry-blauwe-slip-on-155138-thumb-210x210-1428112805.jpg" alt="Fred Perry Blauwe Slip-on" />
<div class="labels">
<span class="discount">-10%</span>
</div>
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@larrybolt
larrybolt / MoveTemporaryFoldersToRamdisk_MacOSX.sh
Created December 16, 2012 22:14 — forked from iwat/MoveTemporaryFoldersToRamdisk_MacOSX.sh
Trying to make it work for user-folders, allow storing the files added to the ramdisk so I can use it for "~/Library/Caches/Google/".
#!/bin/bash
# +----------------------------------------------------------------------+
# | |
# | Set up Mac OS X to store temporary files in RAM rather than on disk.|
# | |
# | By Philipp Klaus <http://blog.philippklaus.de> |
# | |
# | Originally by Ricardo Gameiro <http://blogs.nullvision.com/?p=357> |
# | Changes by Daniel Jenkins |
@larrybolt
larrybolt / Captive Network Assistant
Created August 21, 2013 13:49
Telenet Hotspot/Homespot auto-login Should be placed at: `/System/Library/CoreServices/Captive Network Assistant.app/Contents/MacOS/Captive Network Assistant` overwriting the file
#!/usr/bin/php
<?php
$SSID=trim(`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk -F: '/ SSID:/ {print $2}' | sed -e 's/.*SSID: //'`);
if ( $SSID == 'TELENETHOTSPOT' )
{
if (`curl --cookie-jar /tmp/cookiejar \
--data "c=std&lang=nl&checkterms=1&userid=USERNAME&password=PASSWORD&remember=on&terms=on" \
--cookie "TNLANG=nl&TN_HS_COOKIE_DETECT=HELLO" \
--max-time 60 \
--user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0" \