Skip to content

Instantly share code, notes, and snippets.

[Unit]
Description=NetworkManager applet
After=display-manager.service
[Service]
Environment="DISPLAY=:0"
ExecStart=/usr/bin/nm-applet
Restart=always
RestartSec=10s
@ChimeraCoder
ChimeraCoder / offlineimap.service
Last active November 15, 2015 18:52
Sample systemd service file
[Unit]
Description=OfflineimapGmail
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill offlineimapgmail
ExecStartPre=-/usr/bin/docker rm offlineimapgmail
ExecStartPre=/usr/bin/docker pull chimeracoder/offlineimap-gmail
@ChimeraCoder
ChimeraCoder / gist:9380006
Created March 6, 2014 00:48
Prevent websites from disabling developer console in Chrome
Object.defineProperty(window, 'console', {configurable: false, value: window.console})
Dear Students,
 
After much thought and consideration, the School of General Studies will offer only the Bachelor of Arts degree starting with the May 2014 graduating class.
 
At this point in our history, the academic program of GS is fully and completely integrated with that of Columbia College, and the degree GS awards should reflect that evolution. The Bachelor of Science degree has become a vestige of a time when GS was not fully a liberal arts college of the University.
 
The history of GS is one of dynamic and positive evolution.  To understand our origins, one must go back to the turn of the 20th century, when President Nicholas Murray Butler established the University Extension Program to engage the New York City community, especially working men and women.  In 1921, the Trustees agreed to authorize the granting of the B.S. degree through University Extension.
 
A B.S. degree presumes that the academic program for which the degree is awarded is comprised predominantly of non-liberal arts courses.  In
@ChimeraCoder
ChimeraCoder / ghpagespublish.sh
Last active August 29, 2015 13:56
Use represent to generate the static pages for a directory and automatically publish it to Github
#! /bin/sh
set -e
PROJECT_URL=$1
# Clone into temporary directory
TMPDIR=$(mktemp -d)
@ChimeraCoder
ChimeraCoder / gist:8395008
Created January 13, 2014 05:00
Sample systemd script
[Unit]
Description=A phpbb-like bulletin board in Go
[Service]
ExecStart=/home/stevenleeg/go/bin/gobb
Restart=on-abort
[Install]
WantedBy=multi-user.target
insertRow <- function(existingDF, newrow, r) {
existingDF[seq(r+1,nrow(existingDF)+1),] <- existingDF[seq(r,nrow(existingDF)),]
existingDF[r,] <- newrow
existingDF
}
removeDuplicates <- function(data){
result<- masterdata[1,]
> p <- ggplot(data=masterdata8, aes(certainty, nanoseconds, colour="red")) +
> geom_point() +
> geom_point(data=masterdata4, colour="blue") +
> geom_point(data=masterdata1, colour="green")
> head(masterdata8)
certainty benchmark iterations nanoseconds
1 10 BenchmarkSafePrimes-8 10 13465462805
@ChimeraCoder
ChimeraCoder / blogger-no-js.sh
Created December 5, 2013 02:49
Read Blogger without Javascript
# how to fetch a blogger.com blog
# without the gratuitous javascript
# usage: nameofthisfile blog.whatever.com > html_file
#! /bin/sh
case $# in
1)
{
a=${1%%/*}
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 876 bytes | 0 bytes/s, done.
Total 8 (delta 5), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Go app detected
-----> Using go1.1.2
-----> Running: go get -tags heroku ./...
# cd .; bzr branch https://launchpad.net/mgo/v2 /tmp/build_c43062fc-8c32-437f-9bfd-4ccc909fde22/.heroku/g/src/labix.org/v2/mgo
package github.com/gorilla/pat