Skip to content

Instantly share code, notes, and snippets.

@sigmaSd
sigmaSd / check.rs
Last active February 2, 2024 23:32
spell check lsp server
// [dependencies]
// serde_json = "1.0.96"
// lsp-types = "=0.94"
// lsp-server = "0.7.1"
use std::error::Error;
use std::io::{Read, Write};
use std::process::Stdio;
use lsp_types::{
@aularon
aularon / m4b_split.sh
Last active September 21, 2023 13:34
Split an m4b into its chapters. No recoding is done, just splitting
#!/bin/bash
# Description: Split an m4b into its chapters. No recoding is done, just splitting
# Usage: m4b_split.sh $input_file $output_dir/
# Requires: ffmpeg, jq
# Author: Hasan Arous
# License: MIT
in="$1"
out="$2"
splits=""
@almost
almost / proposal.md
Last active September 12, 2019 09:07
Reactive 2016 Lightning Talk Proposal: Get Flow

This is a proposal for a lightning talk at the Reactive 2016 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)

Get Flow

Type checking JavaScript with Flow

JavaScript is a dynamic language, and there's nothing wrong with that. It allows quick iteration and lowers barriers. However, sometimes some compile-time type checking is just what you need to keep your code in line and give yourself the confidence to build bigger and faster. Flow gives the best of both worlds. You can have normal JavaScript but you can also add types where they're helpful, and it adds zero cost at runtime. In this talk I'll show Flow as it applies to a Redux & React codebase.

@almost
almost / async-await-lightning-talk.md
Last active September 12, 2019 09:07
Reactive 2015 Lightning Talk Proposal: Pyramids be gone!: ES7 Async Function

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)

Pyramids be gone!

ES7 Async Functions

JavaScript is getting async functions (or already has them if you count Babel.JS) and with them a way to finally slay the evil pyramid. This new language feature lets you write asynchronous code that almost looks synchronous, while maintaining the same semantics as promises. This lets you shed your .then and .catch boilerplate and escape those nested callbacks in favour of clean, explicit, maintainable code.

@spmason
spmason / pr
Last active July 15, 2022 10:54
GitHub "open PR" script. Add somewhere in your path, then opening a PR is as easy as typing `pr` on the branch you want to open a PR for
#!/usr/bin/env bash
# GitHub "Open Pull Request" script
#
# Add somewhere in your path, then opening a PR is as easy as typing `pr` while you're
# on the branch you want to open a Pull Request for
#
# NOTES:
# - Uses the `hub` tool: https://cli.github.com/
# - Assumes that the upstream repository is called 'origin' and your fork is named after your github username
@cloudhead
cloudhead / gist:5885445
Created June 28, 2013 15:15
cloudhead's ASCII Emoticons
# cloudhead's ASCII Emoticon reference
T,T Q,Q T_T # Crying face
^,^ ^_^ # Happy face
<,< <_< # Uncertain or hesitant face
V,V V_V # Tired uncertain face, also "Sighing" face
*,* *_* # Exhausted face/Too much computer face
@,@ @_@ # Hangover face
o,o O,O # Surprised face
^.^ # Happy dog face
@premasagar
premasagar / animLoopX.js
Created September 24, 2011 00:47 — forked from louisremi/animLoopX.js
Animation loop with requestAnimationFrame
// Cross browser, backward compatible solution
(function( window, Date ) {
// feature testing
var raf = window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame;
window.animLoop = function( render, element ) {
var running, lastFrame = +new Date;
@cowboy
cowboy / HEY-YOU.md
Last active May 16, 2024 13:31
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.