Skip to content

Instantly share code, notes, and snippets.

View wolfy1339's full-sized avatar

wolfy1339

View GitHub Profile
@wolfy1339
wolfy1339 / tinc-dist.sh
Last active March 4, 2020 20:12 — forked from iczero/tinc-dist.sh
Build a binary tarball of tinc
#!/bin/bash
set -xe
if [[ $EUID -ne 0 ]]; then
fakeroot $0
exit $?
fi
umask 022
VERSION=$(git rev-parse --short HEAD)
autoreconf -fsi
./configure --prefix=/opt/tinc
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link href="jsbin.vijosojile.css" rel="stylesheet">
</head>
<body>
<input type="range">
import os
blacklist = ['.exe', '.pyc', '.ico', '.png', '.icns', '.o', '.obj', '.lib', '.dll', '.idb', '.pdb', '.db', '.sconsign.dblite', '.tlog', '.dblite', '.res', '.vcxproj', '.fliter', '.user', '.sln', '.gz', '.1']
def strip_whitespace_from_cwdir():
for (root, directories, files) in os.walk("."):
for f in files:
if not ('.git' in root or '.vs' in root or '__pycache__' in root or '.sconf_temp' in root or '.tlog' in root or 'build' in root or os.path.splitext(f)[1] in blacklist):
strip_whitespace_from_file(os.path.join(root, f))
@wolfy1339
wolfy1339 / gfm2html
Last active June 12, 2017 17:47 — forked from sivel/gfm2html
Code to convert github flavored markdown to RST
#!/usr/bin/env python
from __future__ import print_function
import pandoc
import requests
import sys
import re
if len(sys.argv) == 2:
markdown_file = sys.argv[1]
@wolfy1339
wolfy1339 / html.css
Last active May 30, 2017 00:59 — forked from jonathantneal/html.css
Microsoft Edge User Agent Stylesheet
/*! Microsoft EdgeHTML 13.10586 | Copyright (C) Microsoft. All rights reserved. */
address {
display: block;
font-style: italic;
}
article {
display: block;
unicode-bidi: embed;
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
@wolfy1339
wolfy1339 / bootstrap-listr.php
Last active September 4, 2023 00:42
One-file (almost) version of Bootstrap Listr
<?php
ini_set('display_errors', 'Off');
error_reporting(E_ALL | E_STRICT);
/**
* Bootstrap Listr
*
* Author: Jan T. Sott
* Info: http://github.com/idleberg/Bootstrap-Listr
@wolfy1339
wolfy1339 / IRC-IMC.py
Last active March 20, 2016 19:38
Simple script to delete given members
import requests
from bs4 import BeautifulSoup
import json
removed = json.load(open('removed.json').read())
session = requests.Session()
with open('password') as f:
data = {
'name': 'wolfy1339a',
@wolfy1339
wolfy1339 / png-to-rgb.cpp
Created February 15, 2016 00:08
WIP PNG to RGB values
// based off the code from http://zarb.org/~gc/html/libpng.html but simplified/stripped down by Lockheedmartin.
// Conversion to C++ by wolfy1339
#include <unistd.h>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cstdarg>
#include <png.h>
int x, y, width, height, r, g, b;
@wolfy1339
wolfy1339 / takeover.py
Last active February 23, 2016 04:15
WIP takeover script for hexchat
from __future__ import print_function
import hexchat
__module_name__ = 'Takeover plugin'
__module_version__ = "1.0"
__module_description__ = 'Python plugin to takeover channels'
def chunks(l, n):
"""Yield successive n-sized chunks from l."""