git branch --merged | egrep -v "(^*|master|dev)" | xargs git branch -d
https://stackoverflow.com/questions/6127328/how-can-i-delete-all-git-branches-which-have-been-merged
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
#!/usr/bin/env python | |
""" | |
Pymodbus Synchronous Client Examples | |
-------------------------------------------------------------------------- | |
The following is an example of how to use the synchronous modbus client | |
implementation from pymodbus. | |
It should be noted that the client can also be used with | |
the guard construct that is available in python 2.5 and up:: |
[device] | |
murano_host = https://jrxncdkk2ls00000.m2.exosite.io/ | |
murano_id = test | |
debug = INFO | |
murano_token = 7504c0bff8e9b9fe73214e0a113bc57a49e7bb14 | |
murano_port = 443 | |
watchlist = config_io,data_out | |
[edged] | |
config_io_file = config_io.json |
#!/usr/bin/env python | |
""" | |
Pymodbus Synchronous Client Examples | |
-------------------------------------------------------------------------- | |
The following is an example of how to use the synchronous modbus client | |
implementation from pymodbus. | |
It should be noted that the client can also be used with | |
the guard construct that is available in python 2.5 and up:: |
document.querySelector('video').playbackRate = 1.5 |
import queue | |
import time | |
from threading import Event, Thread | |
class mo(Thread): | |
def __init__(self, num, q): | |
Thread.__init__(self, name='mo' + str(num)) | |
self.num = num | |
self.q = q |
class Parent(): | |
i = 123 | |
def assign(self, n): | |
self.i = n | |
class ChildA(Parent): | |
def f1(self): | |
Parent.assign(self, 1) |
#!/bin/bash | |
openssl req -newkey rsa:2048 -nodes -keyout server.key \ | |
-subj '/CN=example.com/C=AU/O=Widgits Pty' -outform d -sha256 -out server.crt | |
openssl req -inform d -in server.crt -text -noout | |
# Certificate Request: | |
# Data: | |
# Version: 0 (0x0) | |
# Subject: CN=example.com, C=AU, O=Widgits Pty |
import sqlite3 | |
conn = sqlite3.connect('testDB.db') | |
cursor = conn.cursor() | |
# cursor.execute('''CREATE TABLE test5 | |
# (ID INT PRIMARY KEY NOT NULL, | |
# NAME TEXT NOT NULL);''') | |
with open('1mb.img') as f: | |
readFile = f.read() | |
i = 11 |
git branch --merged | egrep -v "(^*|master|dev)" | xargs git branch -d
https://stackoverflow.com/questions/6127328/how-can-i-delete-all-git-branches-which-have-been-merged