Skip to content

Instantly share code, notes, and snippets.



Block or report user

Report or block nic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nic /
Created Mar 6, 2019
Mirroring a repo from BitBucket (or Gitlab) to Github
  1. Create an empty repo in Github
  2. git clone --bare
  3. cd repo.git
  4. git push --mirror
View find_grep.js
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const Readable = require('readable-stream').Readable;
function complements(arr, predicate) {
const out = [[],[]];
arr.forEach(e => out[Number(!!predicate(e))].push(e));
return out;
if [ -z "$1" ]; then
echo -e "Usage:\n $0 address\n\nEx: $0"
exit 0
for ip in `nslookup $1 |grep Address|grep -v 53 |cut -d":" -f2|cut -d' ' -f2`; do
echo "$ip -> $(ping -c 1 "$ip" | grep time |cut -d'=' -f4)";
nic / setup_relay.js
Last active Dec 15, 2017
create-react-app + Relay Modern without Eject
View setup_relay.js
#!/usr/bin/env node
// by nic - 2017
// It's 10 lines of code to prevent you to call 'yarn eject'
// Just call this script before start/build as in this example:
const fs = require('fs'),
file = require('path').resolve('./node_modules/babel-preset-react-app/index.js'),
texts = fs.readFileSync(file, 'utf8'),
plugin = 'babel-plugin-relay',
pattern = 'const plugins = [';

Keybase proof

I hereby claim:

  • I am nic on github.
  • I am upnic ( on keybase.
  • I have a public key ASC5pwdB_-h8PvZaGxDv7HyUMguyoT87JT9tSj98UdkcRgo

To claim this, I am signing this object:

You can’t perform that action at this time.