Skip to content

Instantly share code, notes, and snippets.

@DeadNumbers
DeadNumbers / sparks.py
Last active Aug 29, 2015 — forked from stefanv/sparks.py
Command line sparks in Python
View sparks.py
#!/usr/bin/python
# coding=utf-8
# Python version of Zach Holman's "spark"
# https://github.com/holman/spark
# by Stefan van der Walt <stefan@sun.ac.za>
"""
USAGE:
@DeadNumbers
DeadNumbers / gist:dd460081bbc39104f2a4
Created Oct 8, 2015 — forked from atcuno/gist:3425484ac5cce5298932
HowTo: Privacy & Security Conscious Browsing
View gist:dd460081bbc39104f2a4

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

View 2chpost.py
import requests
URL = 'https://2ch.hk/makaba/posting.fcgi?'
def posting(board, thread, comment):
values = 'json=1&task=post&board=%s&thread=%s&comment=%s' %(board, thread, comment)
response = requests.post(URL, data=values.encode('utf-8'))
return response.json()
View kmeansnet.py
# Code from Chapter 9 of Machine Learning: An Algorithmic Perspective
# by Stephen Marsland (http://seat.massey.ac.nz/personal/s.r.marsland/MLBook.html)
# You are free to use, change, or redistribute the code in any way you wish for
# non-commercial purposes, but please maintain the name of the original author.
# This code comes with no warranty of any kind.
# Stephen Marsland, 2008
View Hash_ID_v1.1.py
#!/usr/bin/env python
# encoding: utf-8
# Hash Identifier v1.1
# By Zion3R
# www.Blackploit.com
# Root@Blackploit.com
logo=''' #########################################################################
# __ __ __ ______ _____ #
# /\ \/\ \ /\ \ /\__ _\ /\ _ `\ #
View PKGBUILD
# Author: Julien MISCHKOWITZ <wain@archlinux.fr>
# Author: tuxce <tuxce.net@gmail.com>
pkgname=yaourt
pkgver=1.7
pkgrel=1
pkgdesc="A pacman wrapper with extended features and AUR support"
arch=('any')
url="https://github.com/archlinuxfr/yaourt"
license=(GPL)
@DeadNumbers
DeadNumbers / rust_wine.md
Created Aug 15, 2016 — forked from vi/rust_wine.md
Using Rust in Wine as a sort of cross-compiler
View rust_wine.md

Cross-compiling Rust from Linux to Windows using Wine

0. Ensure Rust works on Host

Let's create a dummy project for a test.

$ cargo new test
$ cd test/
$ mkdir examples
View libtcc.c
//http://z0mbie.daemonlab.org/libtcc.c.txt
/*
* Simple Test program for libtcc // modified
*
* libtcc can be useful to use tcc as a "backend" for a code generator.
* ^^^^^^^^^^^^^^^^^^^^
*/
// nb: compiled win32 .exe uses ~80k
View _.c
#define _fCreateFileA pusharg<1,0x860b38bc>
#define _fCreateFileMappingA pusharg<1,0x1F394C74>
#define _fMapViewOfFile pusharg<1,0xFC6FB9EA>
#define _fUnmapViewOfFile pusharg2<1,0xCA036058>
#define _fCloseHandle pusharg3<1,0xF867A91E>
#define _fFindFirstFileA pusharg<1,0x3165E506>
#define _fFindNextFileA pusharg<1,0xCA920AD8>
#define _fSetFileAttributesA pusharg<1,0x152DC5D4>
#define _fGetCurrentDirectoryA pusharg<1,0x2F597DD6>
#define _fLoadLibraryA pusharg<1,0x71E40722>