Skip to content

Instantly share code, notes, and snippets.

View soulshake's full-sized avatar

AJ Bowen soulshake

View GitHub Profile
@jnrbsn
jnrbsn / GPL.md
Last active April 29, 2023 14:59
A Markdown-formatted GPL for your GitHub projects.

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

@markpundsack
markpundsack / gist:2492606
Created April 25, 2012 19:33
Heroku Status API v3

Heroku Status API v3 (second draft)

Get current status

$ curl "https://status-beta.heroku.com/api/v3/current-status"
{"status":{"Production":"green","Development":"green"},"issues":[]}

Get list of issues (optionally limited by date or count)

@stopyoukid
stopyoukid / diff2html.sh
Last active July 16, 2024 03:29
Script that takes a git diff and outputs an html file in GitHub style
#!/bin/bash
#
# Convert diff output to colorized HTML.
# (C) Mitch Frazier, 2008-08-27
# http://www.linuxjournal.com/content/convert-diff-output-colorized-html
# Modified by stopyoukid
#
html="<html><head><meta charset=\"utf-8\"><title>Pretty Diff</title><style>body {text-align: center;}#wrapper {display: inline-block;margin-top: 1em;min-width: 800px;text-align: left;}h2 {background: #fafafa;background: -moz-linear-gradient(#fafafa, #eaeaea);background: -webkit-linear-gradient(#fafafa, #eaeaea);-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa',endColorstr='#eaeaea')\";border: 1px solid #d8d8d8;border-bottom: 0;color: #555;font: 14px sans-serif;overflow: hidden;padding: 10px 6px;text-shadow: 0 1px 0 white;margin: 0;}.file-diff {border: 1px solid #d8d8d8;margin-bottom: 1em;overflow: auto;padding: 0.5em 0;}.file-diff > div {width: 100%:}pre {margin: 0;font-family: \"Bitstream Vera Sans Mono\", Courier, monospace;font-size: 12px;line-height: 1.4em;text-indent: 0.5em;}.file {color:
@ddebin
ddebin / converter.php
Last active December 27, 2015 09:28
Ce script convertit un backup/export DotClear ("blog-backup.txt" flatExport) en posts markdown pour Octopress/Jekyll (ou autres) et en un fichier de commentaires WXR (WordPress eXtended RSS) pour import XML sur Disqus.
<?php
// --
// - Ce script convertit un backup/export DotClear en posts markdown pour Octopress/Jekyll (ou autres)
// et en un fichier de commentaires WXR (WordPress eXtended RSS) pour import XML sur Disqus.
// - Il faut installer le plugin "flatExport" dans DotClear pour récupérer le "blog-backup.txt"
// cf. http://plugins.dotaddict.org/dc1/details/flatExport
// - Vous avez besoin de Pandoc d'installé sur la machine pour la conversion vers Markdown
// cf. http://johnmacfarlane.net/pandoc/
// --
@sztupy
sztupy / INSTALL.md
Last active April 4, 2018 07:49 — forked from namuol/INSTALL.md

rage-quit plugin for oh-my-zsh

based on rage-quit support for bash

HOW TO INSTALL

Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck

Also chmod a+x the flip command.

@jpetazzo
jpetazzo / README.md
Created August 4, 2014 16:48
BASE27 encoding

Base 27 encoding

This is just for lulz.

  • Take a character string (ASCII8, no character >242).
  • Transform each byte into a sequence of 5 trinary digits (i.e. from 00000 to 22222).
  • Concatenate all trinary digits (i.e. a long sequence of 0, 1, and 2).
  • Add extra 0s at the end so that the total length is divisible by 3.
  • Break down by groups of 3.
  • Transform each group of 3 into an integer, ranging from 0 to 26.
@soulshake
soulshake / tld-costs.py
Last active July 28, 2020 12:39
A script to list registration prices of all Gandi TLDs at E rates
#!/usr/bin/env python
"""
Author: AJ Bowen
Created: 2014-10-09
A script to list registration prices of all Gandi TLDs at E rates
Prices correspond to a one-year registration except where a TLD requires a minimum registration
of more than one year.
Output is CSV format containing three fields:
#!/usr/bin/env python
import i3
outputs = i3.get_outputs()
workspaces = i3.get_workspaces()
# figure out what is on, and what is currently on your screen.
workspace = list(filter(lambda s: s['focused']==True, workspaces))
output = list(filter(lambda s: s['active']==True, outputs))
@jmbarbier
jmbarbier / README.gandi.md
Last active October 14, 2015 00:34
"Automatisation" de la formation d'un cloud de CoreOS chez #Gandi...

Lancement "auto" d'un cloud CoreOS chez Gandi

  • gandi cli configuré et prêt à lancer des machines
  • git clone ce gist
  • préparer un discoveryToken sur https://discovery.etcd.io/new?size=1
  • éditer gandi_coreos_test.sh selon besoins (nb instances, noms, ...)

TODO

  • être + efficace (cloner un modèle au lieu de recréer, etc..)
#!/bin/sh
SSID=$1
PSK=$2
nmcli con add con-name "w-$SSID" ifname wlan0 type wifi ssid "$SSID"
nmcli con mod "w-$SSID" wifi-sec.key-mgmt wpa-psk
nmcli con mod "w-$SSID" wifi-sec.psk "$2"
nmcli con up "w-$SSID"