Skip to content

Instantly share code, notes, and snippets.

@crrobinson14
crrobinson14 / chatClient.js
Created January 23, 2020 20:36
WS/REST capable Chat / Action Handling client for ActionHero
const ReconnectingWebSocket = require('reconnecting-websocket');
const axios = require('axios');
const WS = require('ws');
// Written with ES5 metaphors to eliminate the need for Babel in test.
const KEY_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz'.split('');
const generateRequestId = () => {
const uuid = [];
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active April 20, 2025 10:42
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

var pendingNotifications = {},
publicApi = {},
api;
// Dummy function to avoid an Unhandled Rejection error if the user is offline. Prevents us
// from needing to .catch() the notification result in every spot where we call it. Also a
// useful debugging point, so we don't just null it out.
function userNotOnline() {
}
@chales
chales / bbedit-pretty-json-readme.txt
Last active March 7, 2025 11:24
Make JSON legible with BBEdit
2016/03/15
Tested with BBEdit 11.5 / OS X 10.11.3 / Python 2.7.10
http://grokin.gs/blog/elegant-json-pretty-print-for-bbedit/
Place the script (or a link to this script) in the ~/Library/Application Support/BBEdit/Text Filters directory
Restart BBEdit.
The new filter should be under: "Test > Apply Text Filter > bbedit-pretty-json"
@JulienSansot
JulienSansot / ansible playbook for deploying a node app on ubuntu
Created June 3, 2015 06:29
ansible playbook for deploying a node app on ubuntu
---
- hosts: all
remote_user: ubuntu
vars:
app_repo: [email protected]:****/****.git
app_id: my_app
app_folder: /home/ubuntu/my_app
log_folder: /home/ubuntu/my_app_logs
tasks:
- name: git clone