Skip to content

Instantly share code, notes, and snippets.

@vidia
vidia / nginx-unificontroller.conf
Last active May 6, 2024 12:41
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
@maxfi
maxfi / install-latest-tig.sh
Created July 13, 2018 08:32
Install latest version of tig
tig --version
sudo apt -y remove tig
cd /tmp
git clone https://github.com/jonas/tig
cd tig
make configure && ./configure && make && sudo make install && sudo make install-release-doc
@maxfi
maxfi / custom-reconnect.js
Created February 13, 2019 06:25
[Meteor custom reconnect] #meteor
import { Meteor } from 'meteor/meteor'
import _ from 'lodash/fp'
Meteor.startup(() => {
Tracker.autorun(() => {
const { status, retryCount } = Meteor.status()
if ((status === 'waiting') && (retryCount >= 5)) {
const interval = _.random(0, 1000 * 120)
Meteor.disconnect()
console.warn(`5 or more reconnection attempts. Reconnecting in ${interval} ms.`, Meteor.status())
@kiliman
kiliman / README.md
Last active May 6, 2024 12:39
Debug server-side Remix using VSCode

💡 HOWTO: Debug your server-side Remix code using VSCode

✨ New in Remix v1.3.5

The latest release of Remix fixes sourcemaps so you no longer need to use any hacks to set breakpoints in your route modules. Simply start the debugger and Remix will hit the breakpoint in your loaders and actions.

Debugging session even survives edits and Live Reload.

@ZhouGengmo
ZhouGengmo / Readme.md
Last active May 6, 2024 12:38
rdkit-clustering-conformation-generation

Do Deep Learning Methods Really Perform Better in Molecular Conformation Generation?

[arXiv]

Authors: Gengmo Zhou, Zhifeng Gao, Zhewei Wei, Hang Zheng, Guolin Ke

We revisit the benchmark after simple traditional algorithms beat deep learning methods in conformation generation.

Data

@bradtraversy
bradtraversy / graphql-queries-mutations.md
Created June 2, 2022 17:37
GraphQL Queries & Mutations

GraphQL Queries & Mutations

These are the GraphQL queries and mutations for the YouTube course.

Get names of all clients

{
  clients {
    name
 }
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active May 6, 2024 12:38
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@demirdegerli
demirdegerli / ubuntu_debloater.sh
Last active May 6, 2024 12:37
Ubuntu Debloater
#!/bin/sh
if [ "$(whoami)" != "root" ]; then
echo "Please run this script as root."
exit
fi
printf "This script will\n\n- Remove Snap\n- Install the deb version of Firefox\n- Install Flatpak\n- Optionally replace Ubuntu Desktop with GNOME\n\n"
read -p "Continue? (Y/n) " start_prompt
case $start_prompt in
[nN] | [nN][oO] )
exit
@jlongster
jlongster / immutable-libraries.md
Last active May 6, 2024 12:37
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

@yoavniran
yoavniran / addFrameConsciousEvent.js
Created November 1, 2015 09:04
ES6 animation frame conscious event listener
const addFrameConsciousEvent = (obj, event, handler) => { //adapted from: https://developer.mozilla.org/en-US/docs/Web/Events/resize#Example
let isRunning = false;
const handlerWrapper = (e)=> {
if (!isRunning){
isRunning = true;
requestAnimationFrame(()=>{ //throttling so only execute when the browser is ready to re-render
isRunning = false;
handler(e);
})