Skip to content

Instantly share code, notes, and snippets.

View nside's full-sized avatar

nside

View GitHub Profile
@doowon
doowon / jupyter
Last active October 15, 2023 17:46 — forked from jmtatsch/jupyter
A service (init.d) script for jupyter
#! /bin/sh
### BEGIN INIT INFO
# Provides: jupyter
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start jupyter
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@DmitrySoshnikov
DmitrySoshnikov / s-expression-parser.js
Last active October 9, 2023 05:59
S-expression parser
/**
* S-expression parser
*
* Recursive descent parser of a simplified sub-set of s-expressions.
*
* NOTE: the format of the programs is used in the "Essentials of interpretation"
* course: https://github.com/DmitrySoshnikov/Essentials-of-interpretation
*
* Grammar:
*
@dos65
dos65 / EdgeFilterDirection.java
Last active August 29, 2015 14:18
graphopper edgeFilter by azimuth
package com.graphhopper.util;
import com.graphhopper.routing.util.EdgeFilter;
import com.graphhopper.routing.util.FlagEncoder;
import com.graphhopper.storage.NodeAccess;
public class EdgeFilterDirection implements EdgeFilter{
private final double azimuth;
private AngleCalc2D angleCalc = new AngleCalc2D();
@xpe
xpe / artifactory-project.clj
Created March 18, 2015 02:15
Example Artifactory project.clj for Leiningen 2.5
;; To deploy to a hosted Artifactory server:
(defproject project-name "0.1.0-SNAPSHOT"
;; ...
:deploy-repositories
[["releases"
{:url "http://org-name.artifactoryonline.com/org-name/libs-releases-local"
:username :env/artifactory_user
:password :env/artifactory_pass}]
["snapshots"
{:url "http://org-name.artifactoryonline.com/org-name/libs-snapshots-local/"
@takeshixx
takeshixx / hb-test.py
Last active November 6, 2024 06:58
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <[email protected]>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@namuol
namuol / INSTALL.md
Last active December 11, 2024 12:21
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 1, 2025 01:48
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@pitluga
pitluga / core.clj
Created October 29, 2012 18:58
Braintree Clojure Example
(ns braintree-clj.core
(:import [com.braintreegateway BraintreeGateway Environment TransactionRequest Transaction$Type])
(:require [clojure.string :as s]
[hiccup.core :as hiccup]
[hiccup.page-helpers :as page-helper]
[noir.core :as noir]
[noir.request :as noir-req]
@wprater
wprater / app_delegate.rb
Created August 22, 2012 21:23
Minimal ruby files for Cordova and RubyMotion.
class AppDelegate
def init
cookieStorage = NSHTTPCookieStorage.sharedHTTPCookieStorage
cookieStorage.cookieAcceptPolicy = NSHTTPCookieAcceptPolicyAlways
CDVURLProtocol.registerURLProtocol
super
end
@faruken
faruken / lol.py
Created July 25, 2012 05:54
Flask running behind Twisted
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from twisted.application import service
from twisted.web import server, static
from twisted.web.resource import Resource
from twisted.web.wsgi import WSGIResource
from twisted.internet import reactor
from flask.views import MethodView