Skip to content

Instantly share code, notes, and snippets.

@ralavay
ralavay / vim-nginx-conf-highlight.sh
Last active November 5, 2024 02:16
Enable syntax highlight for Nginx conf file in Vim
#!/bin/bash
#
# Highligh Nginx config file in Vim
# Download syntax highlight
mkdir -p ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim
# Set location of Nginx config file
cat > ~/.vim/filetype.vim <<EOF
@denji
denji / README.md
Last active February 16, 2022 05:26
Nightwatch HTML Reporter

Image of Nightwatch Owl Nightwatch HTML Reporter

Install

cd /path/to/project
npm install handlebars

Copy html-reporter.js and html-reporter.hbs to your project basedir.

@DarrenN
DarrenN / get-npm-package-version
Last active May 2, 2025 08:59 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
'use strict'
var jsonfile = require('jsonfile')
var replace = require('replace-in-file')
var fs = require('fs')
fs.readdir('dist', function(err, files) {
var htmlFiles = []
files.forEach(function(x) {
if (/\.html$/.test(x)) { htmlFiles.push('dist/' + x) }
})
@iketiunn
iketiunn / .gitconfig
Last active July 8, 2024 05:39
git/git-snippet/git-flow/
[color]
ui = true
[core]
editor = vim
excludesfile = ~/.gitignore_global
[alias]
cm = commit -m
co = checkout
st = status
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
@yuanying
yuanying / Install.md
Last active February 28, 2025 22:12
Setup uvtool

Install

Host side

Setup bridge

$ sudo su -
# apt-get update
# apt-get remove network-manager

apt-get install bridge-utils

##shortcuts
alias s='git status'
# Easy Navigation
alias ..="cd .."
alias ...="cd ../.."
alias p="cd ~/practices"
alias w="cd ~/workspace"
# Tools
3d-game.com #dtdns.com
4irc.com #dtdns.com
b0ne.com #dtdns.com
bbsindex.com #dtdns.com
chatnook.com #dtdns.com
darktech.org #dtdns.com
deaftone.com #dtdns.com
dtdns.net #dtdns.com
effers.com #dtdns.com
etowns.net #dtdns.com
@trusche
trusche / statsd.md
Last active May 2, 2019 13:05
Installing graphite and statsd on OS X Yosemite

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Graphite

Install Cairo

There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps: