Skip to content

Instantly share code, notes, and snippets.

@CodeBrauer
CodeBrauer / 1_split.command
Created April 8, 2015 13:22
split files under mac os x - very simple!
#!/bin/bash
# just edit the path and the file and run it.
FATFILE="/path/to/big_fat_file.zip"
SAVEPATH="path/to/save/split/files/part_" # notice the end is '/part_'
# 3221225472 byte = 3GiB // perfect for FAT32... (main reason to split files..)
SPLITSIZE="3221225472"
@CodeBrauer
CodeBrauer / _html5-video-find-bookmarklet.md
Created April 9, 2015 15:16
finds html5 video sources and display them in little popup. can be used as a bookmarklet!

Create a new bookmark (CMD+D / CTRL+D) and add the code in "bookmark-link.txt" as link (better copyable in RAW-view):

Pure Vanilla JS. No jQuery!

Tested with newest chrome.

*minified with created bookmarklet with *

@CodeBrauer
CodeBrauer / argvargc.c
Last active August 29, 2015 14:19
argv / argc example
#include <stdio.h>
int main (int argc, char *argv[]) {
int count;
printf ("This program was called with \"%s\".\n",argv[0]);
if (argc > 1){
for (count = 1; count < argc; count++) {
printf("argv[%d] = %s\n", count, argv[count]);
@CodeBrauer
CodeBrauer / start.py
Created April 27, 2015 21:56
check what plugins a wordpress site has installed via http
# prepare before running:
# 1. create folder "plugin_db/"
# 2. chdir to this folder and run this command: `svn list http://plugins.svn.wordpress.org > plugins.txt`
# 3. split plugin.txt in to multiple chunks:
# plugin.txt: ~50000 lines => 50000/10=5000 => split with 5000 lines. Command: `split -l 5000 plugins.txt`
# every chunk of the file is a worker
import subprocess, glob, os
os.chdir("plugin_db/")
@CodeBrauer
CodeBrauer / kf2-server-start.sh
Created May 1, 2015 14:17
kf2 server run script for linux/wine
#!/bin/bash
SCREEN_NAME="kf2-server"
MAP="kf-bioticslab"
DIFFICULTY=10
ADMINNAME=gabriel
ADMINPASSWORD=XXXXXXXX
PORT=7777
#####################################################
@CodeBrauer
CodeBrauer / fix_locations.php
Created May 21, 2015 14:02
Fixes bulk uploaded locations/stores that have no coordinates for the premium wordpress plugin Super Store Finder by highwarden
<?php
/**
* Fixes bulk uploaded locations/stores that have no coordinates
* If this script get killed run it again till all stores have the geolocation
*
* IMPORTANT: needs PHP 5.4+ and cURL (php5-curl)
*
* @author CodeBrauer <[email protected]>
* @link https://github.com/CodeBrauer/
* @version 1.0
@CodeBrauer
CodeBrauer / vhost.sh
Last active March 3, 2016 07:17
super simple vhost generator.
#!/bin/bash
# super simple vhost generator.
# @CodeBrauer <https://github.com/CodeBrauer>
# v0.2
if [ -z "$1" ]
then
echo "Error! No domain name given"
exit 1;
@CodeBrauer
CodeBrauer / osx-for-hackers.sh
Last active August 29, 2015 14:26 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
Date Season Serie Lang Source Stream/TV
24 Aug 2015 S01 Fear The Walking Dead DE http://www.amazon.de/b?ie=UTF8&node=7206521031 Amazon Prime Instant Video
12 Okt 2015 S06 The Walking Dead DE/ENG https://de.wikipedia.org/wiki/The_Walking_Dead_(Fernsehserie) Sky
18 Nov 2015 S02 Silicon Valley DE http://www.serienjunkies.de/silicon-valley/season2.html Sky
?? Feb 2016 S04 House of Cards DE https://de.wikipedia.org/wiki/House_of_Cards_(Fernsehserie) Sky(/Netflix?)
?? Feb 2016 S02 Better Call Saul DE estimated Netflix
?? Jun 2016 S04 Orange Is The New Black DE/ENG estimated (http://on.fb.me/1Pd8GLU) Netflix
?? Jun 2016 S03 Silicon Valley ENG estimated Netflix
2016 S23 Top Gear DE/ENG http://goo.gl/P5wg9t BBC
2016 S01 The New Top Gear on Amazon DE/ENG https://goo.gl/vSJ8T0 Amazon
@CodeBrauer
CodeBrauer / robotjs-ajax.js
Created July 31, 2015 22:46
just a simple demo for a ajax-usage of robotjs - allows to set the mouse position on a simple request like this: http://localhost:4000/movemouse/200/50
var sys = require('sys');
var http = require('http');
var robot = require('robotjs');
console.log('Starting...');
http.createServer(function(request, response) {
result = 0;
if (request.method === 'GET') {
requestEndpoint = request.url.split('/');