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 / 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 / sync_forked_master.sh
Created August 30, 2017 08:11
sync_forked_master.sh
#!/bin/bash
#https://help.github.com/articles/syncing-a-fork/
git fetch upstream
git checkout master
git pull
git merge upstream/master
git push
@printminion
printminion / badoo.css
Last active June 27, 2017 17:26
badoo_hacks
.js-profile-personal-info-container {
position: fixed;
top: 0;
right: 0;
z-index: 3000;
width: 398px;
background-color: #eee;
zoom:62%
}
@printminion
printminion / htmlmagento.js
Created May 18, 2017 14:18
codemirror for magento
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "../htmlmixed/htmlmixed"], mod);
else // Plain browser env
mod(CodeMirror);
@printminion
printminion / gitBanchInfo.php
Created January 30, 2017 09:34
get git branch and hash
<?php
/**
* @desc Get git branch info/hash
* @author Misha M.-Kupriyanov https://google.com/+MishaMKupriyanov
* @link https://gist.github.com/printminion/3e4c099fbb9baa9393f0594ff9f5dd69
*/
echo "[i]Git" . join(':', getSCID());
@printminion
printminion / hueControl.ino
Last active January 28, 2017 15:38
Switch lamp color from green to red by activating PIN 2 (only if the hue bulb is in on state)
/*
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
http://www.makeuseof.com/tag/control-philips-hue-lights-arduino-and-motion-sensor/
Adapted for own purpose by @printminion:
Switch lamp color from green to red by activating PIN 2 (only if the hue bulb is in on state)
*/
#include <ArduinoHttpClient.h>
@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 / zend_db_call.php
Last active January 18, 2017 09:31
example of Zend DB call
<?php
$config = new Zend_Config(
array(
'database' => array(
'adapter' => 'Pdo_Mysql',
//'adapter' => 'Mysqli',
'params' => array(
'host' => 'mysql',
'dbname' => 'database',
@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
/**
* @desc Arduino (MKR1000) movement detection with keyestudio PIL sensors http://wiki.keyestudio.com/index.php/Category:Sensor
* @author Misha M.-Kupriyanov https://google.com/+MishaMKupriyanov
* @link https://gist.github.com/printminion/c89e04daba2cdd66af21f2c2d3688a44
*/
int ledPin = 13; // Connect LED to pin 13
int switcher = 2; // Connect Tilt sensor to Pin2