Skip to content

Instantly share code, notes, and snippets.

View theaxel's full-sized avatar

Axel K. theaxel

  • Chime
  • San Francisco, Hamburg, Cape Town or some Airplane
View GitHub Profile
@dudo
dudo / kubernetes.local.md
Last active December 5, 2021 17:00
Tooling for Interacting with Kubernetes

Kubernetes local development

kubectl

Autocomplete

@agentsim
agentsim / highsierra_bootable.sh
Created June 10, 2017 02:23
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active September 19, 2024 19:00
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@sb8244
sb8244 / gist:351d6561b9617546fbb5
Created March 29, 2015 02:40
Grocer in action
DeviceNotifier = Struct.new(:message, :count) do
def call
notifications.each do |notif|
pusher.push(notif)
end
end
private
def pusher
@sailor
sailor / Vagrantfile
Created March 25, 2015 13:09
Vagrantfile for Rails development environment
VAGRANTFILE_API_VERSION = '2'
$install = <<SCRIPT
curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig
chmod +x /usr/local/bin/fig
SCRIPT
$build = <<SCRIPT
cd /vagrant
fig build
@peelman
peelman / Mnemonic Wordlist.md
Last active March 15, 2021 05:45
Mnemonic encoding wordlist

I don't own this. But the original source is no longer online (insofar as I can tell) and the Wayback machine is currently the only source.

Given that, I wanted to post this here where it could exist in perpetuity, for my use and everybody else's, as well as being fork-able and helpful.

Credit where its due, I was originally introduced to the list via this post on server naming schemes. Also, apparently I'm not the first guy to have this idea.

@booleanbetrayal
booleanbetrayal / Gruntfile.js
Last active November 9, 2023 18:59
Example GruntJS configuration for a replacement to the Sprockets Rails asset pipeline
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
@PrplHaz4
PrplHaz4 / gist:6970887
Last active November 11, 2016 12:40
Creating a confirmation dialog box for a Yii submit button (CHtml::submitButton, CHtml::button, YiiBooster TbButton)
// YiiBooster TbButton
$this->widget('bootstrap.widgets.TbButton',array(
'label'=>'Make some action!',
'buttonType'=>'submit',
'visible'=>true,
'type' => 'primary',
'size' => '',
'icon' => 'ok',
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active September 27, 2024 14:25
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@stevenh512
stevenh512 / gitconfig-git
Created June 11, 2012 10:51
URL rewriting in .gitconfig
# Use git and git+ssh instead of https
[url "git://github.com/"]
insteadOf = https://github.com/
[url "git@github.com:"]
pushInsteadOf = "git://github.com/"
[url "git@github.com:"]
pushInsteadOf = "https://github.com/"