Skip to content

Instantly share code, notes, and snippets.

View gllmp's full-sized avatar

Guillaume Piccarreta gllmp

View GitHub Profile
@vsaarinen
vsaarinen / zendesk.d.ts
Created November 4, 2019 09:44
TypeScript definitions for the Zendesk Web Widget
interface ZendeskWidget {
(
type: 'webWidget:on' | 'webWidget' | 'webWidget:get',
command: string,
payload?: any,
): void;
(
type: 'webWidget',
command: 'updateSettings',
payload: ZendeskSettings,
@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active May 9, 2024 08:47
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem

@tonY1883
tonY1883 / ValidateYoutubeVideoId.js
Created September 14, 2017 02:18
A small trick to check if youtube video exist with its id.
function validVideoId(id) {
var img = new Image();
img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg";
img.onload = function () {
checkThumbnail(this.width);
}
}
function checkThumbnail(width) {
//HACK a mq thumbnail has width of 320.
@Simon-L
Simon-L / Bitwig_TempoBeatLED_ESP8266.ino
Last active November 19, 2017 15:26
Tempo and time signature indicator with RGB LED for Bitwig Studio using Wemos D1 mini (esp8266) and Neopixel led strip.
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>
#include <OSCBundle.h>
#include <OSCData.h>
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 8
#define DATA_PIN 2
@dlublin
dlublin / ffmpeg-hap-readme.md
Created April 18, 2017 13:40
Encoding to Hap from the command line using FFmpeg

Encoding to Hap from the command line using FFmpeg

For users who prefer working with a command line or need to access advanced encoding settings for Hap the popular FFmpeg library can be used to work with Hap movies.

  1. If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.

    You can check that your version of FFmpeg can encode Hap using

    ffmpeg -encoders | grep hap
    
@chranderson
chranderson / nvmCommands.js
Last active May 8, 2024 17:29
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@roblogic
roblogic / msys2-setup.md
Last active March 26, 2024 19:20
MSYS2 first time setup

MSYS2 is a minimalist linux/unix shell environment for Windows.

Quote: "A modern replacement for MSYS bringing recent versions of the GNU toolchains, Git and other common Unix command line tools to the Windows platform"

1. Install

Do all the steps listed here: http://msys2.github.io/
(troubleshooting guide here: https://github.com/msys2/msys2/wiki/MSYS2-installation )

2. Set up proxies

@andyneff
andyneff / Hybrid_files.md
Last active March 27, 2024 14:06
Hybrid script files

Hybrid files

  • A short compilations of hybrid files I've used/modifies whats out there for my use.

What do I mean by hybrid files? A file that can be parsed by two or more scripting lanauges and run (without or minimal error messages)

Batch and python

I copied this from here There are many different versions out there, of varying degrees of difficulty out there. However this is my favorite

@gokulkrishh
gokulkrishh / media-query.css
Last active May 8, 2024 06:59
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */