Skip to content

Instantly share code, notes, and snippets.

View knalli's full-sized avatar
👨‍💻

Jan Philipp knalli

👨‍💻
View GitHub Profile
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Created September 24, 2016 21:46
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
#!/bin/bash
#
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/
# Adapted to work with the official image available into Mac App Store
#
# Enjoy!
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active April 7, 2025 13:24
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@Su-Shee
Su-Shee / gist:285ceeaf126add1e9a11
Last active October 25, 2015 16:47
Falsehoods programmers cannot believe about non-existing things
There is a huge body of valid and yet faked or non-existing things you can use freely e.g. for testing purposes:
* The "Null Island" being a geographical convenience, non-existing island: "Null Island is a fictional island in the Gulf of Guinea
added to the Natural Earth public domain map dataset, located where the equator crosses the prime meridian, at coordinates 0°N 0°E."
see details: https://en.m.wikipedia.org/wiki/Null_Island - it even has a fake travel website :)
http://www.nullisland.com/travel.html
* On TV, you see the recurring fake phone number: https://en.wikipedia.org/wiki/Fictitious_telephone_number
@knalli
knalli / 030_modify_plist.sh
Last active September 17, 2015 16:35 — forked from flpwgr/030_modify_plist.sh
Cordova Hook for App Transport Security iOS 9
#!/bin/bash
PLIST=platforms/ios/*/*-Info.plist
cat << EOF |
Add :NSAppTransportSecurity dict
Add :NSAppTransportSecurity:NSAllowsArbitraryLoads bool YES
EOF
while read line
do
@xjamundx
xjamundx / blog-webpack-2.md
Last active November 7, 2024 13:10
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@johanstenberg92
johanstenberg92 / install-pcp.sh
Created July 2, 2015 19:11
Install Performance Co-Pilot on Amazon Linux AMI
#!/bin/sh
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root."
exit 1
fi
if !(type pcp 2>/dev/null;) then
yum -y install git bison flex gcc-c++ perl-Tk-devel libmicrohttpd-devel
git clone git://git.pcp.io/pcp
@brattonc
brattonc / README.md
Last active April 3, 2025 17:43
D3 Liquid Fill Gauge

Liquid Fill Gauge v1.1 - 7/14/2015

Changes:

  • Added support for updating the gauge value after loading is complete. The loadLiquidFillGauge method now returns an object with an update method which allows the gauge value to be changed. Click any of the gauges above to randomly update their value.

Configurable features include:

  • Changeable min/max values.
  • All colors.
@youknowriad
youknowriad / gulpfile.js
Last active July 24, 2019 20:19
ES6 + ES5 Workflow gulpfile
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var del = require('del');
var source = require('vinyl-source-stream');
var _ = require('lodash');
var extReplace = require('gulp-ext-replace');
var less = require('gulp-less');
var gulpMerge = require('merge-stream');
var ngTemplates = require('gulp-ng-templates');
@leommoore
leommoore / file_magic_numbers.md
Last active April 19, 2025 13:38
File Magic Numbers

File Magic Numbers

Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.

For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.

This gives an ongoing list of file-type magic numbers.

Image Files