Skip to content

Instantly share code, notes, and snippets.

View evenfrost's full-sized avatar

Aliaksei Kislou evenfrost

View GitHub Profile
import express from 'express';
const app = express();
if (IS_DEV) {
require('piping')();
}
//express routes, etc.
export default app;
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active August 19, 2025 04:32
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@tabrindle
tabrindle / webp-convert-directory.sh
Last active August 10, 2025 22:45
Convert all files in directory to webp, with default params, or standard cwebp params passed from command
#!/bin/bash
PARAMS=('-m 6 -q 70 -mt -af -progress')
if [ $# -ne 0 ]; then
PARAMS=$@;
fi
cd $(pwd)
@subhaze
subhaze / JavaScript NG.sublime-syntax
Last active September 29, 2023 14:58
very start of Angular 2 sublime syntax file
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: JavaScript NG
file_extensions:
- js
- ng.js
scope: source.js.ng
contexts:
main:
@khanghoang
khanghoang / shipitfile.js
Created November 8, 2015 09:15
ShipIt demo config file
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
shipit.initConfig({
default: {
workspace: '../shipit-temp-folder',
deployTo: '~/express4-es6',
branch: "shipit",
repositoryUrl: 'https://github.com/khanghoang/express4-es6.git',
ignores: ['.git', 'node_modules'],
@apolloclark
apolloclark / postgres cheatsheet.md
Last active August 18, 2025 16:33
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active July 26, 2025 13:40
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@iofjuupasli
iofjuupasli / async-in-js.md
Last active August 29, 2015 14:26
async graphs in js

Comparison of several ways of working with complex async graphs in js

  A     E
 /|\    |
B | C   F
 \|/
  D
@nolanlawson
nolanlawson / protips.js
Last active November 19, 2024 02:40
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@staltz
staltz / introrx.md
Last active September 11, 2025 01:50
The introduction to Reactive Programming you've been missing