Skip to content

Instantly share code, notes, and snippets.

View bjonnh's full-sized avatar
🐈

Jonathan Bisson bjonnh

🐈
View GitHub Profile
Bus 002 Device 009: ID 045e:0730 Microsoft Corp. Digital Media Keyboard 3000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x045e Microsoft Corp.
(setq bjo-notmuch-packages
'(
;; package names go here
notmuch
helm-notmuch
org-notmuch
))
(setq bjo-notmuch-excluded-packages '())
import { combineReducers } from 'redux';
import { createReducer } from 'redux-act';
import {
emails_data
} from './actions';
const initial = {
email: {
unread: 0
},
import { combineReducers } from 'redux';
import { createReducer } from 'redux-act';
import {
emails_data
} from './actions';
const initial = {
email: {
unread: 0
},
from beakerx import EasyForm, EasyFormComponent, BeakerxLayout, widget_serialization, getValue
from beakerx import BeakerxText
from ipywidgets.widgets.trait_types import InstanceDict
from beakerx import Int, Unicode, Dict, Bool, Union, List
from ipywidgets import Password, Text
class BeakerxPassword(Password, EasyFormComponent):
def on_value_change(self, change):
self.fireChanged(change['new'])
@bjonnh
bjonnh / gist:d01c862e95056bc8bf9fb8cf010dfd1c
Last active March 8, 2018 00:32
error jena kotlin with gradle
Running https://github.com/bjonnh/kotlin_jena from Idea works.
But trying a:
$ gradle clean build
:clean
:compileKotlin
:compileJava NO-SOURCE
:processResources NO-SOURCE
:classes UP-TO-DATE
:jar
import javafx.application.Application
import javafx.beans.property.SimpleIntegerProperty
import javafx.scene.control.Button
import javafx.scene.layout.VBox
import tornadofx.*
import java.time.LocalDate
import java.time.Period
class Person(id: Int, name: String, birthday: LocalDate) {
var id by property(id)
failed: [<DOMAINNAME>] (item={'name': 'myuser', 'ssh_key': 'ssh-rsa <SOMEKEY> cardno:<SOMEID>', 'groups': 'sudo'}) => {
"changed": false,
"item": {
"groups": "sudo",
"name": "myuser",
"ssh_key": "ssh-rsa <SOMEKEY> cardno:<SOMEID>"
},
"module_stderr": "Error: not found\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
@bjonnh
bjonnh / fortac.py
Created December 4, 2018 23:05
Finding the class that overloads a function
class A:
def foo():
print("From A")
class B(A):
def foo():
print("From B")
class C(B):
pass
@bjonnh
bjonnh / fixinsocks.py
Created December 4, 2018 23:08
Replacing code of function in python
def fix():
print("Damn")
def fox():
print("in socks")
fix.__code__ = fox.__code__
fix()
# in socks