This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Rx = require('rx'); | |
const csv = require('csv-parse'); | |
const fs = require('fs'); | |
Rx.Node.fromReadableStream(fs.createReadStream('file.csv').pipe(csv())) | |
.skip(1) | |
.withLatestFrom(rows.take(1), (row, header) => { | |
// Map header[i] => row[i] | |
return row.reduce((rowObj, cell, i) => { | |
rowObj[header[i]] = cell; |
NOTE: Last update to this gist was on Jun 2, 2018. Most of the things here are out of date (e.g consider using zstd for transparent compression instead of lzo), so do your own research as well. Take care!
- Plenty of storage - snapshots will take (sort of) a lot of space
- Latest Arch Linux install iso because those have newer kernels and more bugfixes in btrfs.
- Have previous experience with installing Arch (like you can install arch with a blind fold).
- Read everything through
This shall describe the installation and setup of snapper (CLI
) on Arch Linux.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import {createStore} from 'redux'; | |
import {connect, Provider} from 'react-redux'; | |
/********************************REDUX*****************************************/ | |
//default state | |
const INITIAL_STATE = { | |
value: 0 | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# @example | |
# chmod a+x randommac.sh | |
# ./randommac.sh wlp2s0 | |
# @credits original macOS / osX version via @rem | |
# https://remysharp.com/2017/05/29/getting-free-wifi | |
if [ "$1" != "" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
const puppeteer = require('puppeteer'); | |
const ua = require("useragent"); | |
function isBot(userAgent) { | |
const agent = ua.is(userAgent); | |
return !agent.webkit && !agent.opera && !agent.ie && | |
!agent.chrome && !agent.safari && !agent.mobile_safari && | |
!agent.firefox && !agent.mozilla && !agent.android; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
// Reimplementation of the jQuery plugin "FitText" | |
// https://github.com/davatron5000/FitText.js/blob/master/jquery.fittext.js | |
import React, { PureComponent } from 'react'; | |
type Props = { | |
compressor: number, | |
children: React$Node, | |
}; |
OlderNewer