Real unit test (isolation, no children render)
Calls:
- constructor
- render
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# oh my zsh with some plugins and themes | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
sed -i '' 's/^ZSH_THEME=.*/ZSH_THEME="wezm+"/g' ~/.zshrc | |
sed -i '' 's/^plugins=.*/plugins=(ansible brew common-aliases colorize docker git github history kubectl)/g' ~/.zshrc | |
# sdkman | |
curl -s "https://get.sdkman.io" | bash |
#!/bin/env bash | |
# Install 3rd party repositories | |
sudo rpm -ivh --nodeps http://mirror.centos.org/centos/7/os/x86_64/Packages/atk-2.22.0-3.el7.x86_64.rpm | |
sudo rpm -ivh --nodeps http://mirror.centos.org/centos/7/os/x86_64/Packages/at-spi2-atk-2.22.0-2.el7.x86_64.rpm | |
sudo rpm -ivh --nodeps http://mirror.centos.org/centos/7/os/x86_64/Packages/at-spi2-core-2.22.0-1.el7.x86_64.rpm | |
# Install dependencies | |
sudo yum install -y nodejs gcc-c++ make cups-libs dbus-glib libXrandr libXcursor libXinerama cairo cairo-gobject pango libXScrnSaver gtk3 |
git filter-branch --tree-filter 'prettier --write "**/**.js" || echo “Error formatting, possibly invalid JS“' -- --all | |
git filter-branch --tree-filter '\ | |
prettier --no-config --single-quote --tab-width=4\ | |
--print-width=110 --write "**/**.js" || \ | |
echo “Error formatting, possibly invalid JS“' -- --all |
/* | |
* Verify GitHub webhook signature header in Node.js | |
* Written by stigok and others (see gist link for contributor comments) | |
* https://gist.github.com/stigok/57d075c1cf2a609cb758898c0b202428 | |
* Licensed CC0 1.0 Universal | |
*/ | |
const crypto = require('crypto') | |
const express = require('express') | |
const bodyParser = require('body-parser') |
# uninstall postgresql if necessary | |
$ sudo pacman -R postgresql postgresql-libs | |
# remove postgres files | |
$ sudo rm -rfv /var/lib/postgres | |
# proceed with the installation | |
$ sudo pacman -S postgresql postgresql-libs | |
# setup password for postgres | |
$ sudo passwd postgres |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561 | |
/* | |
* How to delete items from an Array in JavaScript, an exhaustive guide | |
*/ | |
// DON'T use the delete operator, it leaves a hole in the array: | |
var arr = [4, 5, 6]; | |
delete arr[1]; // arr now: [4, undefined, 6] |