Skip to content

Instantly share code, notes, and snippets.

@kaosat-dev
kaosat-dev / listening-client.js
Created February 21, 2016 09:53 — forked from johnnyman727/listening-client.js
Simple MQTT Server. Tessel acts as an MQTT client sending temperature data to a host
var mqtt = require('mqtt')
// Make sure to change this to the IP address of your MQTT server
, host = '192.168.128.204' // or localhost
client = mqtt.createClient(1883, host, {keepalive: 10000});
// Subscribe to the temperature topic
client.subscribe('temperature');
// When a temperature is published, it will show up here
client.on('message', function (topic, message) {
@plieningerweb
plieningerweb / usb-modeswitch-huawei-e303-debian-jessie-lite-raspberry.md
Last active November 19, 2022 19:31
Debug USB-Modeswitch (Raspberry with debian jessi lite) and Huawei E303

test if modeswitch works

$ sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -M "55534243123456780000000000000a11062000000000000100000000000000"

if yes than usually you would do this (but for me it did not work)

#edit config file
/etc/usb_modeswitch.conf
@niun
niun / root-ro
Last active June 27, 2024 14:06
Read-only Root-FS with overlayfs for Raspian
#!/bin/sh
#
# Read-only Root-FS for Raspian
#
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
#
# Originally written by Axel Heider (Copyright 2012) for Ubuntu 11.10.
# This version can be found here:
# https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash#Overlayfs
@artizirk
artizirk / readme.txt
Created April 10, 2015 19:34
Huawei E3372h-153
Working Huawei E3372h-153 SETPORT mappings
replacing A1,A2 with FF turns off need for usb_modeswitch
AT^SETPORT="A1,A2;12,1,16,A1,A2"
^GETPORTMODE: TYPE: WCDMA: huawei,PCUI:0,MDM:1,NDIS:2,CDROM:3,SD:4,
AT^SETPORT="A1,A2;1,12,16,A1,A2"
@philipz
philipz / gist:3d278f414f8eadb5afe1
Last active April 16, 2020 03:25
RUN QEMU-ARM64 on X86

Testing qemu 2.1 arm64 support

qemu-system-aarch64 -m 1024 -cpu cortex-a57 -nographic -machine virt -kernel trusty-server-cloudimg-arm64-vmlinuz-generic -append 'root=/dev/vda1 rw rootwait mem=1024M console=ttyAMA0,38400n8 init=/usr/lib/cloud-init/uncloud-init ds=nocloud ubuntu-pass=ubuntu' -drive if=none,id=image,file=trusty-server-cloudimg-arm64-disk1.img -netdev user,id=user0 -device virtio-net-device,netdev=user0 -device virtio-blk-device,drive=image

qemu-system-aarch64 -m 1024 -cpu cortex-a57 -nographic -machine virt -kernel trusty-server-cloudimg-arm64-vmlinuz-generic -append 'root=/dev/vda1 rw rootwait mem=1024M console=ttyAMA0,38400n8 init=/usr/lib/cloud-init/uncloud-init ds=nocloud' -drive if=none,id=image,file=trusty-server-cloudimg-arm64-disk1.img -netdev user,id=user0 -device virtio-net-device,netdev=user0 -device virtio-blk-device,drive=image

[A Quick'n'Dirty Set-up of an Aarch64 Ubuntu 14.04 VM with QEMU]

@mietek
mietek / set-up-l2tp-ipsec-vpn-on-debian.md
Last active September 30, 2024 18:02
Set up L2TP/IPsec VPN on Debian

Set up L2TP/IPsec VPN on Debian

Set up IPsec

Set up networking

USER=ubuntu
GROUP=ubuntu
sudo mkdir -p /opt/{dev,git} || exit 0
sudo chown -R $USER:$GROUP /opt/{dev,git}
git clone git://github.com/json-c/json-c.git /opt/git/json-c
cd /opt/git/json-c/
autoreconf -i
@claudyus
claudyus / gist:89e59ac1d0199bc20508
Created October 2, 2014 15:11
jenkins openwrt build
#feeds
cp feeds.conf.default feeds.conf
echo "src-git openwisp https://github.com/openwisp/openwrt-feed.git" >> feeds.conf
./scripts/feeds update
./scripts/feeds install -d y openwisp-fw
#config target
echo "CONFIG_TARGET_ar71xx=y" > .config
make defconfig
make -j 4
# Basic Strongswan ikev2 server setup
* paltform: atlantic.net ubuntu 14.04 x64
* the commands below are run with root account
## Strongswan
```
apt-get install strongswan
apt-get install iptables iptables-persistent
```
@ecliptik
ecliptik / aarch64qemu.md
Last active August 16, 2023 11:03
Ubuntu 14.04 arm64 Port QEMU Configuration

Setting up a Ubuntu 14.04 or Debian 8 (jessie) arm64 VM

This is mainly a notes dump and should be used for reference. This guide assumes:

  • Ubuntu 14.04 (or Debian 8) hypervisor/host with bridge networking
  • Knowledge of qemu
  • Knowledge of debootstrap

Limitations of the qemu-system-aarch64 emulator on x86 include only being able to emulate one CPU and no KVM support.