Skip to content

Instantly share code, notes, and snippets.

View F1LT3R's full-sized avatar
🌱
Growing Things

Alistair MacDonald F1LT3R

🌱
Growing Things
View GitHub Profile
@kika
kika / antiantialias.sh
Last active July 8, 2022 17:05
Keep VS Code UI font antialiased when the editor window has the antialias turned off
# MacOS only
# This script modifies one VS Code file. After that the VS Code will complain that the installation is damaged.
# You can dismiss the warning or install an extension that recalculates the checksums for the files
# The script creates a backup for the CSS file it modifies
perl -i.bak -pe 's/\.monaco-workbench.mac.monaco-font-aliasing-none{-webkit-font-smoothing:none/.monaco-workbench.mac.monaco-font-aliasing-none{-webkit-font-smoothing:antialiased/g' \
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.css
@fracasula
fracasula / proxy.js
Last active November 28, 2019 16:12
Node.js basic example for proxy to http server
/**
* Once this is running open your browser and hit http://localhost
* You'll see that the request hits the proxy and you get the HTML back
*/
'use strict';
const net = require('net');
const http = require('http');
@ddewaele
ddewaele / simple-cognito-auth.js
Created January 29, 2017 10:25
cognito authentication from nodeJS
var AWS = require('aws-sdk');
var AWSCognito = require('amazon-cognito-identity-js');
var util = require('util');
var params = {
Username: '',
Password: '',
UserPoolId: 'us-west-2_aLI134pRo',
ClientId: '3jmku5aeaqe6pdkqa5q18trjk5',
IdentityPoolId: 'us-west-2:93be5994-d1aa-4e3a-b088-3ed28fa4b068',
@anvaka
anvaka / 00.Intro.md
Last active April 30, 2024 03:36
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
anonymous
anonymous / gist:5b2002a4335ce444e016
Created September 24, 2015 14:34
// ## $.withAdvice
//
// Borrowed by [Flight](https://github.com/flightjs/flight).
//
// `withAdvice` is a mixin that defines `before`, `after` and `around` methods.
//
// These can be used to modify existing functions by adding custom code. All
// components have advice mixed in to their prototype so that mixins can augment
// existing functions without requiring knowledge of the original
// implementation.
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@rxaviers
rxaviers / gist:7360908
Last active May 2, 2024 09:30
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
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:

@textarcana
textarcana / centos-install-syntax-highlighting-in-less.sh
Last active May 1, 2023 01:01
2020 update: just use bat(1) instead!!!! bat has git integration and also can show invisible characters! OLD STUFF: How to enable syntax-highlighting in less. Use `less -N` (or type -N while in less) to enable line numbers. Based on the procedure described in http://superuser.com/questions/71588
# Enable syntax-highlighting in less.
# Last tested on CentOS 6.3.
#
# First, add these two lines to ~/.bashrc
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
# export LESS=" -R "
sudo yum -y install boost boost-devel ctags
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm
@jussi-kalliokoski
jussi-kalliokoski / example.js
Created February 6, 2012 16:11
A simple proposal for the interfaces needed for useful MIDI access
// Example usage, a MIDI proxy that picks the first available MIDI input and routes its messages to the first MIDI outputs
navigator.getUserMedia({midi: true}, function (MIDIAccess) {
try {
var input = MIDIAccess.getInput(MIDIAccess.enumerateInputs()[0]);
var output = MIDIAccess.getOutput(MIDIAccess.enumerateInputs()[0]);
} catch (e) {
console.error("Couldn't find suitable MIDI devices");
}