Skip to content

Instantly share code, notes, and snippets.

Severyn Kozak sevko

Block or report user

Report or block sevko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@taseppa
taseppa / gist:66fc7239c66ef285ecb28b400b556938
Last active Aug 5, 2019
Getting your Tinder access token and facebook id
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active Jun 3, 2019
[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
CMCDragonkai / http_streaming.md
Last active Aug 12, 2019
HTTP Streaming (or Chunked vs Store & Forward)
View http_streaming.md

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

View replace.py
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
missinglink / go-ubuntu-install.md
Last active Feb 5, 2019
Install go on ubuntu
View go-ubuntu-install.md

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: https://golang.org/dl/

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

wget https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz;
@rmarianski
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
preshing / build_cross_gcc
Last active Aug 16, 2019
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
sevko / README.md
Last active Jul 29, 2019
Compile a full-featured Vim (w/ Python, Ruby, etc.).
View README.md

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 compile_full_vim.sh 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
sevko / README.md
Last active Aug 29, 2015
Import Quattroshapes into PostgreSQL.
View README.md

import quattroshapes into PostgreSQL

The import_quattroshapes_pgsql.sh 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:

bash import_quattroshapes_pgsql.sh

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

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

mkdir pelias

Schema

git clone git@github.com:pelias/schema.git
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.