Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmitry Maslennikov daimor

View GitHub Profile
View AOC.Y2017.cls
Class AOC.Y2017 Extends %RegisteredObject
{
/*
ADVENT OF CODE 2017
Built With...
_
@franquis
franquis / reverse.py
Created Oct 3, 2016
Reverse page order in PDF file with Python
View reverse.py
#!/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 Dec 21, 2016
Macros for writing forward compatible JSON code in InterSystems Caché 2016.1
View cosJSON.isc
#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()
@amjd
amjd / gist:acc5e108bfb2f29f050c
Created Jun 6, 2014
List of websites used in Conlectus's WhoAmI - http://tinsnail.neocities.org/
View gist:acc5e108bfb2f29f050c
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/',
@daimor
daimor / cplatname.patch
Created Apr 6, 2014
Patch for GlobalsDB cplatname for enable installing to CentOS, and Ubuntu any versions
View cplatname.patch
--- 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
@mendelgusmao
mendelgusmao / btsync
Last active Mar 4, 2021
init.d script for btsync (based on another script built to run dropbox)
View btsync
#!/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.