Skip to content

Instantly share code, notes, and snippets.

View buemarce's full-sized avatar
🧑‍💻

Marcel Buehring ETHZ D-INFK/ISG buemarce

🧑‍💻
View GitHub Profile
@buemarce
buemarce / README.md
Created May 22, 2024 05:49 — forked from mrkpatchaa/README.md
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.

@buemarce
buemarce / Barrier
Created May 18, 2024 08:41 — forked from xrpdevs/Barrier
Running Barrier pre-login on Mac OS
#!/bin/sh
## Put this file in /Library/StartupItems/Barrier
. /etc/rc.common
BARRIER="/Library/StartupItems/Barrier/barrierc_prelogin"
SERVER="192.168.7.101:24800"
SCREEN_NAME="Jamies-iMac-Pro.local"
@buemarce
buemarce / header_http_status_codes.php
Created October 11, 2018 08:22 — forked from phoenixg/header_http_status_codes.php
PHP header() for sending HTTP status codes
<?php
/*
参考自:
http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function
http://snipplr.com/view/68099/
*/
function HTTPStatus($num) {
$http = array(
@buemarce
buemarce / certgen.rb
Created August 7, 2016 06:21 — forked from sheerun/certgen.rb
Docker TLS certificate generator
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@buemarce
buemarce / certgen.rb
Created August 7, 2016 06:21 — forked from sheerun/certgen.rb
Docker TLS certificate generator
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@buemarce
buemarce / install-cloud9.bash
Last active August 29, 2015 14:28 — forked from ubinix-warun/install-cloud9.bash
Install Cloud9 IDE on Ubuntu 12.04, Raspberry Pi
cd ~
sudo npm install -g sm
sudo apt-get install git-core libxml2-dev
git clone https://github.com/ajaxorg/cloud9.git cloud9
cd ./cloud9
sudo sm install
...
#!/bin/sh
#
# Use posixregex CLI tool from: https://github.com/syzdek/dmstools/blob/master/src/posixregex.c
RE_IPV4="((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
posixregex -r "^(${RE_IPV4})$" \
127.0.0.1 \
10.0.0.1 \
192.168.1.1 \

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software