Skip to content

Instantly share code, notes, and snippets.

View rxw1's full-sized avatar
☠️

rxw1

☠️
  • Upper Silesia, Germany
View GitHub Profile
@rxw1
rxw1 / countTabs.js
Last active December 30, 2015 07:49 — forked from jlewin/countTabs.js
Count open tabs in Google Chrome.
chrome.windows.getAll({populate: true}, function(a) {
var n=0;
for (var x in a) {
n+=a[x].tabs.length;
}
console.log(n);
});
// => undefined (?)
// => 154 :D
@rxw1
rxw1 / node.service
Created February 15, 2014 16:28 — forked from Dianoga/node.service
[Unit]
Description=Start Herir Node.js Service
Requires=network.target
After=network.target
[Service]
Type=forking
WorkingDirectory=/srv/hereir/node
ExecStart=/usr/bin/forever start --pidFile /var/run/hereir.pid HereIR.js
ExecStop=/usr/bin/forever stop HereIR.js
chrome.windows.getAll({populate: true}, function(allWindows)
{
console.log(allWindows);
});
@rxw1
rxw1 / index.html
Created June 28, 2014 22:23 — forked from mbostock/.block
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
body {
background: #333;
}
@rxw1
rxw1 / org.asdflabs.screenbla.plist
Last active October 25, 2016 17:16 — forked from joostrijneveld/scpscreenshots.sh
Upload Screenshot – Get Link
<!--
OS X launchd plist: Copy to ~/Library/LaunchAgents
and launch with launchctl load ~/Library/LaunchAgents/org.asdflabs.screenbla.plist.
Make sure the path to the shell script is correct.
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

Texas, out of the 50 states:

  • Amount of carbon dioxide emissions (1st)
  • Amount of toxic chemicals released into water (1st)
  • Amount of recognized cancer-causing carcinogens released into air (1st)
  • Amount of hazardous waste generated (1st)
  • Workers' compensation coverage (50th)
  • Percent of population with a high school diploma (50th)
  • Percent of uninsured children (1st)
  • Percent of children living in poverty (4th)
  • Percent of population uninsured (1st)
@rxw1
rxw1 / cycle-http-driver.js
Created February 9, 2016 23:51 — forked from bouzuya/cycle-http-driver.js
cycle-http-driver.js (node-fetch)
import fetch from 'node-fetch';
import Rx from 'rx';
function makeHTTPDriver() {
var requests = {};
return function(request$) {
return request$
.filter(request => {
if (typeof request === 'undefined' || request === null) return false;
const { id } = request;
@rxw1
rxw1 / middleware.js
Created February 11, 2016 03:27 — forked from cahnory/middleware.js
koa-webpack-middleware
import connect from 'koa-connect';
import compose from 'koa-compose';
import webpack from 'webpack';
import webpackDev from 'webpack-dev-middleware';
import webpackHot from 'webpack-hot-middleware';
export default function (config = {}) {
let compiler = webpack(config);
return compose([
@rxw1
rxw1 / Usage
Created June 8, 2016 01:51 — forked from eidantoei/Usage
Generate GIF animation randomly
$ ls -1 ??.jpg
10.jpg
12.jpg
14.jpg
16.jpg
18.jpg
20.jpg
22.jpg
24.jpg
26.jpg