Skip to content

Instantly share code, notes, and snippets.

View larrybolt's full-sized avatar
🏡
Remote: Office Not Required

Larry Boltovskoi larrybolt

🏡
Remote: Office Not Required
View GitHub Profile
@larrybolt
larrybolt / a.js
Created March 5, 2017 20:21
NodeJS require singletons
const common = require('./common')
module.exports.add = (e) => common.add(e)
module.exports.get = () => common.get()
@larrybolt
larrybolt / blocklist.txt
Created November 6, 2016 14:27
transmission-blocklist-11-2016 source: walshie4/Ultimate-Blocklist
This file has been truncated, but you can view the full file.
# List distributed by iblocklist.com
Malicious:1.192.128.23-1.192.128.23
Malicious:5.12.220.33-5.12.220.33
Malicious:5.101.168.211-5.101.168.211
Malicious:5.178.68.196-5.178.68.196
Malicious:5.189.133.185-5.189.133.185
Malicious:5.189.143.31-5.189.143.31
Malicious:5.189.146.159-5.189.146.159
// Let's say we have an array of candy
var all_candy = [
{
name: 'Mars',
price: 1,
category: 'chocolate'
},
{
name: 'Snickers',
@larrybolt
larrybolt / suspend_until
Created March 5, 2016 18:15
Suspend your pc until a certain hour
#!/bin/bash
# Auto suspend and wake-up script
#
# Puts the computer on standby and automatically wakes it up at specified time
#
# Written by Romke van der Meulen <redge.online@gmail.com>
# Minor mods fossfreedom for AskUbuntu
#
# Takes a 24hour time HH:MM as its argument
#!/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 / 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>
@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 / 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');
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 / 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==