Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@raininja
raininja / gist:e1c6a3f4b60ac550b77b
Last active August 29, 2015 14:28
Could not compile `rustc-serialize`.
Compiling rustc-serialize v0.3.15
/home/raijin/.cargo/registry/src/github.com-0a35038f75765ae4/rustc-serialize-0.3.15/src/serialize.rs:201:5: 201:64 warning: the trait `core::marker::Sized` is not implemented for the type `Self` [E0277]
/home/raijin/.cargo/registry/src/github.com-0a35038f75765ae4/rustc-serialize-0.3.15/src/serialize.rs:201 fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/raijin/.cargo/registry/src/github.com-0a35038f75765ae4/rustc-serialize-0.3.15/src/serialize.rs:201:5: 201:64 help: run `rustc --explain E0277` to see a detailed explanation
/home/raijin/.cargo/registry/src/github.com-0a35038f75765ae4/rustc-serialize-0.3.15/src/serialize.rs:201:5: 201:64 note: `Self` does not have a constant size known at compile-time
/home/raijin/.cargo/registry/src/github.com-0a35038f75765ae4/rustc-serialize-0.3.15/src
@raininja
raininja / gist:3652050
Created September 6, 2012 06:20 — forked from tranthamp/gist:2721326
D-Bus and Connman notes
# Connman Technology API examples: (Object Path: /net/connman/technology/<wifi/ethernet>, Interface: net.connman.Technology)
# GetProperties
dbus-send --system --dest=net.connman --print-reply /net/connman/technology/wifi net.connman.Technology.GetProperties
# Scan
dbus-send --system --dest=net.connman --print-reply /net/connman/technology/wifi net.connman.Technology.Scan
# Disable/Enable wifi
dbus-send --system --dest=net.connman --print-reply /net/connman/technology/wifi net.connman.Technology.SetProperty string:Powered variant:boolean:true
@raininja
raininja / example.profile
Created September 3, 2013 15:04
example user profile
(i__main__
ProfileSettings
p0
(dp1
S'deviceName'
p2
VOCZ Neural Impulse Actuator
p3
sS'qfThreshold'
p4
@raininja
raininja / gist:6587733
Created September 16, 2013 22:55
pyqtgraph update issues
class MainWindow(QtGui.QMainWindow):
""" init Qt and draw stuff """
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
self.resize(1000,600)
self.setWindowTitle('pyqtnia-alpha')
area = DockArea()
self.setCentralWidget(area)
dock1 = Dock("one", size=(150,550), hideTitle=True)
@raininja
raininja / setup_mosh_centos.sh
Created January 31, 2017 05:27 — forked from tancnle/setup_mosh_centos.sh
Setup mosh on Centos 6.x
#!/bin/sh
# Update latest epel
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm
# Download and build mosh
sudo yum -y install rpm-build rpmdevtools protobuf-compiler protobuf-devel libutempter-devel zlib-devel ncurses-devel openssh-clients perl-IO-Tty openssl-devel gcc gcc-c++
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
[root@b9a5f77b-fbaa-45b7-a775-938bc76ada64 /]# cat /opt/local/etc/varnish/*
vcl 4.0;
import std;
backend default {
.host = "127.0.0.1";
.port = "8080";
}
@raininja
raininja / makeauthority.sh
Created January 12, 2018 14:42 — forked from richieforeman/makeauthority.sh
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@raininja
raininja / autossh.service
Last active January 13, 2018 17:05 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@raininja
raininja / conkyrc
Created October 14, 2015 18:58
conky lua rings
# — Conky settings — #
background yes
update_interval 1
cpu_avg_samples 2
net_avg_samples 3
override_utf8_locale yes
double_buffer yes
@raininja
raininja / .multitailrc
Created December 22, 2021 18:40 — forked from homeyjd/.multitailrc
multitail color scheme
#~/.bash_profile
alias mt='multitail -CS php'
#~/.multitailrc
# See documentation
# keetweej.vanheusden.com/svn/multitail/trunk/multitail.conf
#
# Get this file right! If you don't multitail will just crash.
# No warning, no error, just won't start. And it's your fault.