Skip to content

Instantly share code, notes, and snippets.

View nathanchere's full-sized avatar
💭
I've moved to https://gitlab.com/nathanchere - these repos no longer maintained

Nathan Chere nathanchere

💭
I've moved to https://gitlab.com/nathanchere - these repos no longer maintained
View GitHub Profile
@nathanchere
nathanchere / EGKB---the-Endgame-Keyboard-_ANSI_.kbd.json
Last active June 2, 2019 17:13
EGKB - the Endgame Keyboard (ANSI)
[
{
"backcolor": "#555",
"name": "EGKB - the Endgame Keyboard (ANSI)",
"author": "Nathan Chere",
"radii": "11px",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX1A-C1xx",
"plate": true
@jeromecoupe
jeromecoupe / webstoemp-gulpfile.js
Last active January 21, 2024 16:28
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@nickytonline
nickytonline / customizing-vs-code.md
Last active April 27, 2024 00:44
Customizing VS Code for Two Fonts.

Customizing VS Code

I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }.

Gotchas

  • Ensure it’s a file URL e.g. { "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] }
  • If you move the location of your file and update your user settings with the new location, you will need to disable and enable custom CSS cmd+shift+p.
  • Also, anytime you change the style in your custom CSS file, you need to disable, then re-enable the extension.

For reference

@JoachimL
JoachimL / SendGrid.csx
Created March 25, 2017 10:00
Sendgrid through azure function
#r "SendGrid"
using System.Net;
using SendGrid.Helpers.Mail;
public static HttpResponseMessage Run(HttpRequestMessage req, TraceWriter log, out Mail message)
{
log.Info("C# HTTP trigger function processed a request.");
// parse query parameter
string name = req.GetQueryNameValuePairs()
@orpiske
orpiske / gist:4889cffb219bd20e806e9ac35ce5a9bd
Last active September 3, 2017 18:18
OpenPHT compilation on Fedora
Obs.: tested on Fedora 24 ...
1. Clone OpenPHT:
git clone https://github.com/RasPlex/OpenPHT.git
2. Install build dependencies:
sudo dnf install freetype-devel SDL-devel SDL_image-devel libjpeg-turbo-devel sqlite-devel curl-devel lzo-devel tinyxml-devel fribidi-devel fontconfig-devel yajl-devel libmicrohttpd-devel openssl-devel glew-devel avahi-devel flac-devel ffmpeg-devel python-devel libtiff-devel libvorbis-devel libmpeg2-devel libass-devel librtmp-devel libplist-devel shairplay-devel libva-devel libvdpau-devel libcec-devel swig boost-devel libusb-devel systemd-devel nasm libmodplug-devel libcdio-devel -y
3. Build:
mkdir build ;
<noscript id="textNS">
| |
| a w r i t e u p r e l e a s e b y r o l |
| ________ ___ ________ ________ |
| <_ __ \/ \/ \/ ____ \ |
| T T<___/\___/\_ /\ _/\ \__j _/ |
| | | T T T / \ T__\____ T |
| | | | | | \ / |T T T | |
| l__j_____l___j_l__><__j| | | | |
@kommen
kommen / mp3_info.ex
Created May 8, 2016 18:28
Compute MP3 variable bitrate file duration with Elixir
defmodule Mp3Info do
def duration(data) do
compute_duration(data, 0, 0)
end
defp compute_duration(data, offset, duration) when byte_size(data) > offset do
case decode_header_at_offset(offset, data) do
{:ok, length, {samplerate, samples}} ->
compute_duration(data, offset + length, duration + (samples / samplerate))
@mollyporph
mollyporph / indexlinqlist.cs
Last active September 16, 2015 08:52
Indexed linq list
using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
//Create a list of 20 anon objects wiht Name and Age
@tregusti
tregusti / polymer-polytechnics.md
Last active October 28, 2015 09:48
Malmö Polymer Polytechnics
@craigtp
craigtp / BetterRandom.cs
Last active June 13, 2018 22:51
BetterRandom - A C# class to produce random numbers which inherits from the .NET framework's System.Random class and so can be a drop-in replacement for usages of the standard Random class, but which uses the RNGCryptoServiceProvider to generate better (and cryptographically secure) random numbers.
using System;
using System.Security.Cryptography;
namespace BetterRandomNumbers
{
// BetterRandom.cs
// This class implements a random number generator that is based off the Windows "Next Generation" cryptographically secure
// random number generator. It inherits from the base Random class, so can be used as a "drop-in" replacement for the
// built-in .NET System.Security.Random class, but providing a superior quality of random numbers.
public class BetterRandom : Random, IDisposable