Hello
made with esnextbin
made with esnextbin
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 { getBus, applyReduxMiddleware } from 'suber' | |
import { createEpicMiddleware } from 'redux-observable' | |
import { ajax } from 'rxjs/observable/dom/ajax' | |
// Get the bus | |
const bus = getBus() | |
// Declare the redux-observable middleware | |
// Listen on the 'FETCH_USER' channel and look for github username | |
// in the 'payload' property. |
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 { getBus } from 'suber' | |
const bus = getBus() | |
// Listen on channel / topic / action type | |
// and toggle the sidebar when something arrives | |
bus.take('TOGGLE_SIDEBAR', () => sidebar.toggle()) | |
// In another part of the app | |
// send something on the 'TOGGLE_SIDEBAR' channel | |
bus.send('TOGGLE_SIDEBAR', null) |
I hereby claim:
- I am oskarhane on github.
- I am oskar (https://keybase.io/oskar) on keybase.
- I have a public key ASAmFdr0s9By7_Tz28MKx7TOTFO9yGGQ10_Yxv3sKIxU4wo
To claim this, I am signing this object:
I hereby claim:
- I am oskarhane on github.
- I am oskar (https://keybase.io/oskar) on keybase.
- I have a public key whose fingerprint is 4069 993D 74AC DF06 D59A 66FB 4FE1 AA79 E870 4033
To claim this, I am signing this object:
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
phantom = require('phantom') | |
if(!process.argv[2]) { | |
console.log('Usage: node app.js [url]') | |
process.exit(1) | |
} | |
var url = process.argv[2] | |
phantom.create(function(ph){ | |
ph.createPage(function(page) { |
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/python3 | |
# Writter by Oskar Hane | |
import subprocess | |
import sys | |
import re | |
conf_dir = '/etc/nginx/sites-enabled/' | |
command = ["/usr/bin/docker ps | grep " + sys.argv[1]] | |
p = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) |
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 subprocess | |
import sys | |
import re | |
conf_dir = '/etc/haproxy/conf.d/' | |
command = ["/usr/bin/docker ps | grep " + sys.argv[1]] | |
p = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) | |
output, err = p.communicate() | |
d_str = output.decode("utf-8") |
NewerOlder