Skip to content

Instantly share code, notes, and snippets.

View RadicalZephyr's full-sized avatar

Zefira Shannon RadicalZephyr

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
@reillysiemens
reillysiemens / roulette.bash
Last active January 14, 2016 07:20
I got bored.
alias roulette='for i in {0..5}; do echo -e "import random as rand; import webbrowser as wb; import string as s; import urllib.request as req\ntry:\n\tu = \"https://bit.ly/%s\" % \"\".join(rand.choice(s.ascii_letters+s.digits) for _ in range(0, 6))\n\tr = req.urlopen(u)\n\tprint(\"BANG!\")\n\twb.open(u)\nexcept:\n\tprint(\"click\")" | python3; done'
;; Lambkin, a garbage-collected heap suitable for microcontrollers.
;; Copyright (C) 2015 Andy Wingo <wingo@igalia.com>.
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@stoikerty
stoikerty / javascript.js
Last active May 31, 2020 14:02
Gulp + Browserify - multi-file recipe (JSX, coffeescript, uglify & sourcemaps)
// Config that can be loaded externally, similar
// to [gulp-starter](https://github.com/greypants/gulp-starter)
var src = './app/assets';
var dest = './public';
var config = {
javascript: {
src: src + '/javascript_app/**/*.{js,coffee}',
rootFiles: [
{
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@mwhite
mwhite / expanded_history.py
Last active April 20, 2020 19:21
Bash history with bash and git aliases expanded
"""
Outputs history with bash and git aliases expanded.
"""
from __future__ import print_function
import re
from subprocess import check_output
BASH_ALIASES = {}
for line in check_output('bash -i -c "alias -p"', shell=True).split('\n'):
@Kimundi
Kimundi / dynamic_typing.rs
Last active January 6, 2023 18:56
Dynamic typing in Rust
use std::unstable::intrinsics::{TyDesc, get_tydesc, forget};
use std::util::Void;
use std::cast::transmute;
///////////////////////////////////////////////////////////////////////////////
// TypeId
///////////////////////////////////////////////////////////////////////////////
/// `TypeId` represents a globally unique identifier for a type
pub struct TypeId {
@waylan
waylan / foo.sh
Created November 15, 2012 18:39
Simple bash subcommands. Each subcommand is implemented as a function. For example, `sub_funcname` is called for `funcname` subcommand.
#!/bin/sh
ProgName=$(basename $0)
sub_help(){
echo "Usage: $ProgName <subcommand> [options]\n"
echo "Subcommands:"
echo " bar Do bar"
echo " baz Run baz"
echo ""
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@daveray
daveray / seesaw-repl-tutorial.clj
Created December 7, 2011 04:55
Seesaw REPL Tutorial
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.