Skip to content

Instantly share code, notes, and snippets.

View toke's full-sized avatar

Thomas Kerpe toke

View GitHub Profile
@crabdancing
crabdancing / minecraft.sh
Created August 3, 2018 23:43
Minecraft Launcher alternative with no bullshit calling home
#!/usr/bin/env bash
# Copyleft (C) Alexandria Pettit
# GNU GPL v3
# This is a script to load Minecraft on Linux machines without using Mojang's crappy launcher.
# It is currently pretty much unusable for anyone but me, but I'm going to hopefully fix that soon!
# it'll require quite a lot of reverse engineering however.
# TODO: figure out how to better dynamicize .jar lib loading
@jdarpinian
jdarpinian / executable.c
Last active March 20, 2024 15:28
Add one line to your C/C++ source to make it executable.
///bin/true;COMPILER_OPTIONS="-g -Wall -Wextra --std=c99 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $COMPILER_OPTIONS -xc "$THIS_FILE" -o "$OUT_FILE" || exit;exec "$OUT_FILE" "$@"
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 21, 2024 17:20
Hyperlinks in Terminal Emulators
@JacobBennett
JacobBennett / blog.md
Last active October 21, 2023 17:30
Clean up your Vue modules with ES6 Arrow Functions

Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.

The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.

<script>

// require vue-resource...

new Vue({
service {
dhcp-server {
disabled false
dynamic-dns-update {
enable true
}
global-parameters "key rndc-key { algorithm HMAC-MD5; secret paste_your_ddns_secret_here; };"
global-parameters "zone home.local. { primary 10.1.2.2; key rndc-key; }"
global-parameters "ddns-domainname &quot;home.local.&quot;;"
global-parameters "ddns-rev-domainname &quot;in-addr.arpa.&quot;;"
@thde
thde / alpine-install.sh
Last active February 23, 2024 22:59
A script to install alpine linux on a dedicated server. Tested on Hetzner, Kimsufi / OVH
#!/bin/sh
set -ex
PATH=/bin:/sbin:/usr/bin:/usr/sbin
KEYMAP="us us"
HOST=alpine
USER=anon
ROOT_FS=ext4
BOOT_FS=ext4
@monkbroc
monkbroc / In case of fire.svg
Created October 11, 2015 21:39
In case of fire
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@windytan
windytan / whistle-encode.pl
Last active February 6, 2022 09:06
whistle encoder
#!/usr/bin/perl
# windytan's pea whistle encoder
# http://www.windytan.com/2015/10/pea-whistle-steganography.html
# (c) 2015 Oona Räisänen
# ISC license
use warnings;
use strict;
my $data = $ARGV[0] // "OHAI!";
@monkbroc
monkbroc / 50-particle.rules
Last active June 11, 2018 15:09
Udev rules for Particle devices
# UDEV Rules for Particle boards
#
# This will allow reflashing with DFU-util without using sudo
#
# The latest version of this file may be found at:
# https://gist.github.com/monkbroc/b283bb4da8c10228a61e
#
# This file must be placed at:
#
# /etc/udev/rules.d/50-particle.rules (preferred location)
@monkbroc
monkbroc / random_name.rb
Created July 5, 2015 14:44
Random thingy name generator, like pleasant_cat and smooth_duck
#!/usr/bin/env ruby
require 'highline/import'
ADJECTIVES = %w(
broad crooked curved deep even flat hilly jagged round shallow square
steep straight thick thin triangular uneven average big fat gigantic
huge large little long massive medium miniature narrow petite short
skinny small tall tiny wide cooing deafening faint harsh hissing hushed
husky loud melodic mute noisy purring quiet raspy screeching shrill