Skip to content

Instantly share code, notes, and snippets.

View printminion's full-sized avatar
💭
Time flies like an arrow; fruit flies like a 🍌

@printminion printminion

💭
Time flies like an arrow; fruit flies like a 🍌
View GitHub Profile
@printminion
printminion / Makefile
Created October 20, 2021 07:46 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@printminion
printminion / start-vpn.sh
Created June 14, 2018 21:05 — forked from kordless/start-vpn.sh
VPN Server for Google Cloud
#!/bin/bash
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)
SERVER_NAME=vpn-$NEW_UUID
gcloud compute instances create $SERVER_NAME \
--machine-type "n1-standard-1" \
--image-family ubuntu-1604-lts \
--image-project "ubuntu-os-cloud" \
--boot-disk-size "20" \
--boot-disk-type "pd-ssd" \
--boot-disk-device-name "$NEW_UUID" \
@printminion
printminion / server.py
Created February 23, 2018 09:45 — forked from martijnvermaat/server.py
SimpleHTTPServer with history API fallback
#!/usr/bin/env python
"""
Modification of `python -m SimpleHTTPServer` with a fallback to /index.html
on requests for non-existing files.
This is useful when serving a static single page application using the HTML5
history API.
"""
@printminion
printminion / KubernetesBitcoinConfigs.md
Created October 18, 2017 19:25 — forked from zquestz/KubernetesBitcoinConfigs.md
GCE Kubernetes Bitcoin Configs

Bitcoin Kubernetes Configs

The following guide will walk you through creating a bitcoin full node within GKE (Google Container Engine).

By default Bitcoin btc1 (SegWit 2X) is used, however this can be swapped for any other node quite easily.

If you wish to run another version of bitcoind, just change the image reference in bitcoin-deployment.yml. There are tons of images available on the Docker Hub. Better yet, build your own. =)

The source for the included image is available at: https://github.com/zquestz/docker-bitcoin

@printminion
printminion / LICENSE
Created October 13, 2017 14:58 — forked from kjlubick/LICENSE
Exports a THREE.js scene mesh to STL, making it suitable for 3d printing
The MIT License
Copyright © 2010-2016 three.js authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@printminion
printminion / Control Philips Hue from Arduino Ethernet Shield
Created January 23, 2017 18:14 — forked from jamesabruce/Control Philips Hue from Arduino Ethernet Shield
Example of using an Arduino with Ethernet shield to control Philips Hue, with PIR motion sensor on i/o pin 2.
/*
Talking to Hue from an Arduino
By James Bruce (MakeUseOf.com)
Adapted from code by Gilson Oguime. https://github.com/oguime/Hue_W5100_HT6P20B/blob/master/Hue_W5100_HT6P20B.ino
*/
#include <SPI.h>
#include <Ethernet.h>
// Hue constants
@printminion
printminion / sqlite3mysql.py
Created December 21, 2016 15:25 — forked from techouse/sqlite3mysql.py
A simple Python 3 script to transfer the data from SQLite 3 to MySQL. Requires MySQL Connector/Python 2.0.4 or higher.
#!/usr/bin/env python3
__author__ = "Klemen Tušar"
__email__ = "techouse@gmail.com"
__copyright__ = "GPL"
__version__ = "1.0.1"
__date__ = "2015-09-12"
__status__ = "Production"
import os.path, sqlite3, mysql.connector
@printminion
printminion / 1_drawable_ic_hash_io16.xml
Created March 18, 2016 11:33 — forked from nickbutcher/1_drawable_ic_hash_io16.xml
Animated Stroke. The google I/O website this year (https://google.com/io) has some funky animated lettering. I especially liked the animated stroke around the letters and wondered how you might implement that on Android. Turns out that AnimatedVectorDrawable makes this very easy! Here's how it looks: https://twitter.com/crafty/status/71077957997…
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@printminion
printminion / Code.gs
Created February 19, 2016 18:10 — forked from erickoledadevrel/Code.gs
Create a Google Calendar event with an attachment in Apps Script
function createEventWithAttachment() {
var driveFileId = '...';
var file = DriveApp.getFileById(driveFileId);
var event = {
summary: 'Test Event with Attachments',
description: 'Woot!',
attachments: [{
fileId: driveFileId,
fileUrl: file.getUrl(),
mimeType: file.getMimeType(),