Skip to content

Instantly share code, notes, and snippets.

View daimor's full-sized avatar

Dmitry Maslennikov daimor

View GitHub Profile
@amjd
amjd / gist:acc5e108bfb2f29f050c
Created June 6, 2014 05:30
List of websites used in Conlectus's WhoAmI - http://tinsnail.neocities.org/
var rawSites = {
'programming': [
'http://blog.codinghorror.com/',
'http://thedailywtf.com/',
'http://www.hanselman.com/blog/',
'http://code.tutsplus.com',
'https://news.ycombinator.com/',
'http://www.reddit.com/r/programming/',
'http://codebetter.com',
'http://android-developers.blogspot.com/',
@mendelgusmao
mendelgusmao / btsync
Last active March 4, 2021 15:37
init.d script for btsync (based on another script built to run dropbox)
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
Class AOC.Y2017 Extends %RegisteredObject
{
/*
ADVENT OF CODE 2017
Built With...
_
@franquis
franquis / reverse.py
Created October 3, 2016 13:02
Reverse page order in PDF file with Python
#!/usr/bin/python
"""
This script reverse the pages of a PDF document and save it to a new file.
Dependancy :
- "PDFRW"
Usage :
- `pip install pdfrw`
- `python reverse.py file.pdf`
@isc-bspead
isc-bspead / cosJSON.isc
Last active December 21, 2016 08:00
Macros for writing forward compatible JSON code in InterSystems Caché 2016.1
#include %occReference
#if $$$comClassDefined("%Library.Object")
#define jsonClassIsLatestVersion $classIsLatestVersion
//usage: obj.$$$jsonClassIsLatestVersion()
#define jsonExtends $extends
//usage: {}.$$$jsonExtends(classname)
#define jsonFromJSON $fromJSON
//usage: {}.$$$jsonFromJSON(string)
#define jsonGetIterator $getIterator
//usage: obj.$$$jsonGetIterator()
@daimor
daimor / cplatname.patch
Created April 6, 2014 13:15
Patch for GlobalsDB cplatname for enable installing to CentOS, and Ubuntu any versions
--- cplatname 2013-05-02 17:50:01.000000000 -0700
+++ cplatname.new 2014-04-05 11:43:21.676624274 -0700
@@ -114,13 +114,13 @@
distName=`cat /etc/issue | cut -f1 -d" "`
version=`cat /etc/issue | cut -f2 -d" " | cut -f1-2 -d"."`
proc=`uname -m`
- if [ "$distName" = "Ubuntu" -a "$version" = "11.04" -a "$proc" = "x86_64" ] ; then
+ if [ "$distName" = "Ubuntu" -a "$proc" = "x86_64" ] ; then
plat="lnxsusex64"
fi