Skip to content

Instantly share code, notes, and snippets.

View orangecms's full-sized avatar
🐢
Hack the planet!

Daniel Maslowski orangecms

🐢
Hack the planet!
View GitHub Profile
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2
owGtkr2LE0EYxvf8IgrCBawlDFiIIczsfOxOxFq9Qjw8T64xNx/vJOPd7cbdTTQc
EUtLsVCxFP8AG/0nFEEbhcNGENFOLLQQdTYEOUGsnGp49/c8+7zvO7cP740azbcX
Vhm8fFAsPPuoo4tfu9+2kc7tBHW3kdn0kFX1LVNbgLpoAyZaldDxeSvLLXSulK05
00ZjKEqfZ4HCnbRDUjRt13ythk0LZdXb8Lb+SgjBznKeEEeVtkZwTFILQqWYMieE
JZIRLDV1nGpJbOwMMYpocI6mhiQ8BqzCD53P+lAMC19HRJTZRMgYGKEy1iROsLQC
a2Etp1xQJnjwVUkchIO8rP5oBs2S9mbx/sL/59yjmR01NpbYGR7KTpOEMu2UTAVJ
ZPAlsgZLKOaDzwsVmjVbZT3VUB57A7v20vfVYKT/Iakmw7p2DXRvru5pn9kwwd2b
@orangecms
orangecms / gpg-edit.sh
Last active February 22, 2016 11:10
simple script to edit gpg-encrypted files :)
#!/bin/bash
if [ -n "$1" ]
then
PGP_KEY_ID=CED8B95F
ENCRYPTED_FILE=${1}
TEMP_FILE=/tmp/gpg-edit-temp # TODO: test if file exists and loop through .0, .1, etc. to avoid collisions
if [ -f "$ENCRYPTED_FILE" ] # if file exists, decrypt
then
@orangecms
orangecms / gpg-less.sh
Created March 18, 2016 16:21
Simply read a gpg-encrypted file in less
#!/bin/bash
# if $1 is set, source the corresponding file
if [ -n "$1" ]
then
if [ -f "$1" ]
then
gpg --decrypt $1 2> /dev/null | less
else
echo "File does not exist."
@orangecms
orangecms / gpg-source.sh
Last active March 19, 2016 20:51
Simply source a gpg-encrypted shell script
#!/bin/bash
# Since the exported env vars would only exist in this script,
# you will have to source this file and then call the function.
function gpg-source {
# if $1 is set, source the corresponding file
if [ -n "$1" ]
then
if [ -f "$1" ]
#!/bin/env bash
if [ ! -n "$1" ]; then echo "Please provide a project name."; exit; fi
# 1. create app
mkdir $1
cd $1
meteor create src
cd src
# 2. remove scaffolding junk
@orangecms
orangecms / podcasts.opml
Created June 12, 2016 22:21
My podcasts subscriptions - mostly tech, specifically FLOSS, web, JavaScript, and Artificial Intelligence
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
<head>
<title>BeyondPod Feeds</title>
<dateCreated>Mon, 13 Jun 2016 00:15:21 GMT+02:00</dateCreated>
<dateModified>Mon, 13 Jun 2016 00:15:21 GMT+02:00</dateModified>
</head>
<body>
<outline text="Uncategorized" />
<outline text="JS/web">
@orangecms
orangecms / .eslintrc.yml
Created June 28, 2016 13:47 — forked from dferber90/.eslintrc.yml
Example setup of ESLint-plugin-Meteor with AirBnB's code style
# enable ES6
parserOptions:
ecmaVersion: 6
sourceType: "module"
ecmaFeatures:
jsx: true # enable React's JSX
# register plugins
plugins:
- meteor
@orangecms
orangecms / linux-localversion-git-branch-name.sh
Created May 15, 2017 14:33
A simple one-liner to get the current branch name in your Linux kernel `.config` 🎉
#!/bin/bash
sed -i "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=\"$(git branch | grep "*" | cut -b 3-)\"/" .config
@orangecms
orangecms / .hyper.js
Created August 21, 2017 08:34
Hyper config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
@orangecms
orangecms / docker-clean
Created October 20, 2017 12:40
Workaround for the pointless crap Docker leaves behind to bloat up your disk
#!/bin/bash
## see https://lebkowski.name/docker-volumes/
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi