Skip to content

Instantly share code, notes, and snippets.

@popk
popk / gist:8b93c1502fc411bf35662d1a9c289496
Created December 20, 2016 03:29 — forked from jwebcat/gist:5122366
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@popk
popk / README.md
Created December 9, 2016 00:19 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@popk
popk / FirebaseCustomLoginRESTAPI.cs
Created July 6, 2016 11:59 — forked from pipiscrew/FirebaseCustomLoginRESTAPI.cs
[CSharp] Firebase *Custom Login* via REST API
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
namespace FBDesktop
{
@popk
popk / mpipypi.py
Created April 20, 2016 01:02 — forked from jcchurch/mpipypi.py
Compute Pi using Python and MPI4PY
"""
This code computes pi. It's not the first python
pi computation tool that I've written. This program
is a good test of the mpi4py library, which is
essentially a python wrapper to the C MPI library.
To execute this code:
mpiexec -np NUMBER_OF_PROCESSES -f NODES_FILE python mpipypi.py
@popk
popk / install-esp8266-open-sdk-mac-osx.md
Created February 20, 2016 22:00 — forked from nazt/install-esp8266-open-sdk-mac-osx.md
install-esp8266-open-sdk-mac-osx.md

#install dependencies brew tap homebrew/dupes brew install binutils coreutils automake wget gawk libtool gperf gnu-sed --with-default-names grep export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"

#prepare case-sensitive disk sudo hdiutil create ~/Documents/case-sensitive.dmg -volname "case-sensitive" -size 10g -fs "Case-sensitive HFS+" sudo hdiutil mount ~/Documents/case-sensitive.dmg

#create symbolic link to /esp8266

@popk
popk / xpub-xsub.js
Last active August 29, 2015 14:28 — forked from tjanczuk/xpub-xsub.js
How to connect 5 publishers with 5 subscribers over TCP using ZeroMQ's XPUB/XSUB proxy
// How to connect 5 publishers with 5 subscribers
// over TCP using ZeroMQ's XPUB/XSUB proxy.
// sub (connect)
// <-8701->
// (bind) xpub <---> xsub (bind)
// <-8700->
// (connect) pub
var zmq = require('zmq');
@popk
popk / autologin.js
Last active August 29, 2015 14:27 — forked from nazt/autologin.js
autologin.js
var request = require("request");
var cheerio = require('cheerio');
var $;
var post = function(form) {
request.post({
followAllRedirects: true,
url: 'http://202.162.79.194/login/sz/hotspotlogin.php',
form: form
/*
You'll need the information below, get these after adding a device. I'm using the MAC address as the device's ID.
org=[org-id]
type=[device-type]
id=[device-id]
auth-method=token
auth-token=[auth-token]
*/
#!/bin/bash
# Slightly modified version from https://raw.githubusercontent.com/Nyr/openvpn-install/master/openvpn-install.sh
# Run with sudo ./openvpn-install.sh and not sudo sh ./openvpn-install.sh as read command has issues with external triggering of scripts
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS
# This script will work on Debian, Ubuntu, CentOS and probably other distros
# of the same families, although no support is offered for them. It isn't
# bulletproof but it will probably work if you simply want to setup a VPN on
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and
# universal as possible.
#!/usr/bin/python
"""
Exploit for Samba vulnerabilty (CVE-2015-0240) by sleepya
The exploit only targets vulnerable x86 smbd <3.6.24 which 'creds' is controlled by
ReferentID field of PrimaryName (ServerName). That means '_talloc_zero()'
in libtalloc does not write a value on 'creds' address.
Reference:
- https://securityblog.redhat.com/2015/02/23/samba-vulnerability-cve-2015-0240/