Skip to content

Instantly share code, notes, and snippets.

View devtin's full-sized avatar
💭
wondering...

Martin Rafael Gonzalez devtin

💭
wondering...
  • Keep Wondering, LLC
  • McKinney, TX
  • X @tin_r
View GitHub Profile
@nethoncho
nethoncho / pm2-ipc.js
Created December 15, 2017 14:28
pm2 IPC Minimum needed to send message to process
/*
The online documents were not very clear.
http://pm2.keymetrics.io/docs/usage/pm2-api/#send-message-to-process
https://stackoverflow.com/a/35504369/3386260
https://github.com/pm2-hive/pm2-hive.github.io/pull/117
*/
// Sender
// The sender can run inside or outside of pm2
var pm2 = require('pm2');
@sport4minus
sport4minus / crossfade-videos.js
Last active October 24, 2022 18:58
Crossfade two videos on Raspberry Pi /w omxplayer and node.js using omxplayer-controll
/*
crossfade-videos.js by github.com/sport4minus
test based on omxplayer-controll example by github.com/winstonwp
– crossfade two videos on raspberry pi using node.js, omxplayer-controll https://github.com/winstonwp/omxplayer-controll and omxplayer.
– working based on omxplayer's capability to set a video render layer.
– two instances of omxplayer are started on different layers, the upper ones' alpha is changed during runtime.
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@bullshit
bullshit / Install Docker on Raspberry Pi (Arch Linux).md
Created April 11, 2014 21:22
Install Docker on Raspberry Pi (Arch Linux)

Install Docker on Raspberry Pi (Arch Linux)

Prepare SD Card

  1. Download Image
  2. Unzip Image
  3. Copy Image on SD Card (dd if=./ArchLinuxARM-2014.03-rpi.img of=/dev/disk2)
  4. Boot Raspberry Pi

Connect to Pi

  1. Find out IP
@joyrexus
joyrexus / README.md
Last active June 27, 2024 15:39
Node.js streams demystified

A quick overview of the node.js streams interface with basic examples.

This is based on @brycebaril's presentation, Node.js Streams2 Demystified

Overview

Streams are a first-class construct in Node.js for handling data.

Think of them as as lazy evaluation applied to data.

@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active June 22, 2024 05:19
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: