Skip to content

Instantly share code, notes, and snippets.

View tjarksaul's full-sized avatar
🦄

Tjark Saul tjarksaul

🦄
View GitHub Profile
@tjarksaul
tjarksaul / .gitignore
Created December 16, 2013 11:47 — forked from rbochet/.gitignore
# Latex files
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
# HTTP Status Cats
# Apache (htaccess) config created by @dave1010
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>'
$ echo $DISPLAY
:0.0
$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: Chromium
@tjarksaul
tjarksaul / mavericks.bootable.iso.sh
Last active October 8, 2015 14:06
Create Bootable ISO from Mavericks App.
#!/usr/bin/env bash
# Original: http://thezinx.com/2013/10/29/create-bootable-dmg-iso-mavericks-app.html
V_BUILD=/Volumes/install_build
V_APP=/Volumes/install_app
T_SI_B=/tmp/elcap
T_SI=$T_SI_B.sparseimage
@tjarksaul
tjarksaul / pliim-turnOff.scpt
Last active January 21, 2018 08:13 — forked from zehfernandes/pliim-turnOff.scpt
One click and be ready to go up on stage and shine! - https://zehfernandes.github.io/pliim/
# Turn on Notifications
do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE; defaults -currentHost delete com.apple.notificationcenterui doNotDisturbDate; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" -- this set 'Do not disturb' to false in the pref
# Show Desktop
do shell script "defaults write com.apple.finder CreateDesktop -bool true; killall Finder"
# Show all windows
tell application "System Events"
set visible of (every process) to true
end tell
func makeGetCall() {
// Set up the URL request
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1"
guard let url = URL(string: todoEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = URLRequest(url: url)
// set up the session
@tjarksaul
tjarksaul / setup.sh
Last active January 29, 2022 09:41 — forked from lgreenlee/tinydns.service
TinyDNS/DJBDNS setup for Ubuntu/Debian
#!/bin/bash -e
apt install -y ucspi-tcp build-essential
wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
tar xf djbdns-1.05.tar.gz
cd djbdns-1.05/
echo gcc -O2 -include /usr/include/errno.h > conf-cc
wget https://www.fefe.de/dns/djbdns-1.05-test28.diff.xz
xz -d djbdns-1.05-test28.diff.xz
@tjarksaul
tjarksaul / git-update
Last active February 10, 2023 13:06 — forked from steve-jansen/git-update
A custom script for git to stash any working changes, pull origin main, and unstash your working changes
#!/bin/bash
stash() {
# check if we have uncommited changes to stash
git status --porcelain | grep "^." >/dev/null;
if [ $? -eq 0 ]
then
if git stash save -u "git-update on `date`";
then