Skip to content

Instantly share code, notes, and snippets.

View born2net's full-sized avatar
🕑
be present

AngularNinja.com born2net

🕑
be present
View GitHub Profile
@born2net
born2net / gist:0fe438c5851b4c01326d5bd99e043a58
Created July 11, 2016 16:23
git: recreate repository based on current files
cp .git/config /tmp/gitBackup
rm -rf .git
git init
cp /tmp/gitBackup .git/config
git remote add origin <url from 1st command>
git add .
git status
git commit -m "rewrite history"
git push -f
export class VisibilityObserver {
constructor(element, callback) {
this.callback = callback;
if(window.IntersectionObserver) {
this.observer = new IntersectionObserver(
::this.processChanges, { threshold: [0.5] });
this.observer.observe(element);
@born2net
born2net / PatchYun.ino
Last active August 29, 2015 14:09 — forked from sgk/PatchYun.ino
#include <Process.h>
void setup() {
Bridge.begin();
Serial.begin(9600);
while (!Serial)
;
Serial.print("Patching...");
/*
* Firmata is a generic protocol for communicating with microcontrollers
* from software on a host computer. It is intended to work with
* any host computer software package.
*
* To download a host software package, please clink on the following link
* to open the download page in your default browser.
*
* http://firmata.org/wiki/Download
*/
/*
* Firmata is a generic protocol for communicating with microcontrollers
* from software on a host computer. It is intended to work with
* any host computer software package.
*
* To download a host software package, please clink on the following link
* to open the download page in your default browser.
*
* http://firmata.org/wiki/Download
*/