Skip to content

Instantly share code, notes, and snippets.

@pissang
pissang / echarts-svg.js
Last active March 2, 2024 15:27
Server side SVG rendering of ECharts
const echarts = require("echarts");
const Canvas = require('canvas');
const {JSDOM} = require('jsdom');
const fs = require('fs');
echarts.setCanvasCreator(() => {
return new Canvas(100, 100);
});
const {window} = new JSDOM();
global.window = window;
@greyscaled
greyscaled / README.md
Last active September 19, 2022 08:59
Sequelize + Express + Migrations + Seed Starter
@hagemann
hagemann / slugify.js
Last active October 30, 2023 09:10
Slugify makes a string URI-friendly
function slugify(string) {
const a = 'àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;'
const b = 'aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------'
const p = new RegExp(a.split('').join('|'), 'g')
return string.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters
.replace(/&/g, '-and-') // Replace & with 'and'
.replace(/[^\w\-]+/g, '') // Remove all non-word characters
@aviskase
aviskase / Postman.desktop
Last active November 21, 2023 20:56
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/home/USERNAME/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@axmenon
axmenon / DockerWindowsInstallation.md
Last active September 14, 2017 12:40
How to install Docker on Windows 10 ?

I did not find a single exhaustive resource which describes the process of Docker installation on Windows. This gist describes how to install docker on Windows 10, assuming virtualization is disabled on your PC.

Step 0

  • Download the Docker Toolbox from the Docker Toolbox Page.
  • Complete installation by clicking 'Next' several times and finally 'Finish'.
  • Open terminal and run docker pull hello-world
  • If the command completes exection and pulls the image down, skip the rest of the steps. This gist is not for you.
  • If you get an error like such:
var path = require('path')
module.exports = {
'config': path.resolve('server', 'config', 'database.json'),
'migrations-path': path.resolve('server', 'migrations'),
'models-path': path.resolve('server', 'models'),
'seeders-path': path.resolve('server', 'seeders'),
}
@alper
alper / simple-git-branching-model.md
Last active December 8, 2023 10:43 — forked from jbenet/simple-git-branching-model.md
Normative git branching model based on rebasing and best practices

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.