Skip to content

Instantly share code, notes, and snippets.

taseppa / gist:66fc7239c66ef285ecb28b400b556938
Last active Aug 18, 2020
Getting your Tinder access token and facebook id
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active Aug 5, 2020
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
View XPS-15 9560 Getting Nvidia To Work on KDE Neon
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev
CMCDragonkai /
Last active Oct 23, 2020
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

import ctypes
from ctypes import pythonapi as api
import sys
from types import (BuiltinFunctionType, GetSetDescriptorType, FrameType,
MemberDescriptorType, MethodType)
import guppy
from guppy.heapy import Path
hp = guppy.hpy()
missinglink /
Last active Jul 29, 2020
Install go on ubuntu

note: always check for the latest versions, the version numbers shown here will fall out of date quickly.

Installing Go on Ubuntu:

Step 1. Grab yourself a binary release from here:

You'll want to use one from the Stable versions, you probably want one which is in bold, for Ubuntu it's xxx-linux-amd64.tar.gz

rmarianski / anonstruct.c
Created Dec 29, 2014
Embed structures in c
View anonstruct.c
#include <stdio.h>
typedef struct point {
int x, y;
} point;
typedef struct point3d {
struct point;
int z;
} point3d;
preshing / build_cross_gcc
Last active Oct 22, 2020
A shell script to download packages for, configure, build and install a GCC cross-compiler.
View build_cross_gcc
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
sevko /
Last active Jul 26, 2020
Compile a full-featured Vim (w/ Python, Ruby, etc.).

compile full Vim

The default Vim installed on most Linux distros lacks a number of vital features, like xterm_clipboard (allows copy-and-pasting to the system clipboard) and python (on which certain plugins rely). The shell script removes the currently installed Vim and compiles a full-featured version; it's based entirely off Valloric's YouCompleteMe walkthrough, which it bundles into a simple script for convenience. Vim will be compiled with the following feature flags:

  • --with-features=huge
  • --enable-multibyte
sevko /
Last active Nov 6, 2019
Import Quattroshapes into PostgreSQL.

import quattroshapes into PostgreSQL

The shell-script will import all Quattroshapes shapefiles into a PostgreSQL database. The process has some gotchas and is generally painful to do manually. Before running the script, ensure that you are logged in as a user with permissions to access/write to PostgreSQL. Then:


Note that the script will create a Postgres table quattroshapes, and download all Quattroshapes shapefiles into

hkrishna / gist:d0a3ffab8160f1ddef0d
Last active Aug 29, 2015
Set up Pelias (Quick and Dirty)
View gist:d0a3ffab8160f1ddef0d

mkdir pelias


git clone
npm install

install plugin

(if you used homebrew to install elasticsearch it should be /usr/local/Cellar/elasticsearch)

You can’t perform that action at this time.