Skip to content

Instantly share code, notes, and snippets.

View bogdanr's full-sized avatar
💭
:(){ :|:& };:

Bogdan Rădulescu bogdanr

💭
:(){ :|:& };:
View GitHub Profile
@bogdanr
bogdanr / command list
Created December 28, 2013 13:44
HLK-RM02 - Boot of the general purpose image By default wireless in not enabled in this image (see /etc/config/wireless) The default address for accessing this image is 192.168.1.1 on the lan interface
root@OpenWrt:~#
[ crond find init logread nslookup rm sysctl umount
[[ crontab firstboot insmod ls ntpd rmdir sysupgrade uname
arping cut free ipcalc.sh lsmod odhcp6c rmmod tail uniq
ash date fsync iptables md5sum opkg route tar uptime
askfirst dbclient grep iptables-restore mkdir passwd scp tee vconfig
awk dd gunzip iptables-save mkfifo pgrep sed telnet vi
basename devstatus gzip iw
@bogdanr
bogdanr / dmesg
Created December 28, 2013 13:16
HLK-RM02 - Boot of the minimal image
[ 0.000000] Linux version 3.10.13 (bogdan@osc) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2013.05 r38333) ) #5 Sat Dec 28 12:30:53 EET 2013
[ 0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[ 0.000000] MIPS: machine is HILINK HLK-RM04
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] User-defined physical RAM map:
[ 0.000000] memory: 01000000 @ 00000000 (usable)
[ 0.000000] Zone ranges:
@bogdanr
bogdanr / HLK-RM02 U-Boot printenv
Last active January 1, 2016 02:59
Boot HLK-RM02 various configs
RT5350 # printenv
bootcmd=tftp
bootdelay=1
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off
addmisc=setenv bootargs $(bootargs) console=ttyS0,$(baudrate) ethaddr=$(ethaddr) panic=1
flash_self=run ramargs addip addmisc;bootm $(kernel_addr) $(ramdisk_addr)
kernel_addr=BFC40000
@bogdanr
bogdanr / gist:84bb70247e3035ce68c2
Created May 7, 2015 07:45
wpa_supplicant corporate cfgs
ctrl_interface=/var/run/wpa_supplicant
update_config=1
network={
ssid="Corporate_wifi"
key_mgmt=WPA-EAP
eap=TLS
identity="bogdan.radulescu"
ca_cert="/home/bogdan/stuff/ca.pem"
client_cert="/home/bogdan/stuff/client.pem"
@bogdanr
bogdanr / gist:9145a9defa2050a9f56b
Last active August 29, 2015 14:17
Very basic Linux CPU core speed tests
# These should run in under two minutes on a decent CPU from 2014
time echo "scale=7000; a(1)*4" | bc -l
echo '2^2^23' | time bc > /dev/null
crazy-horizon() {
rm -rf horizon/build horizon/MANIFEST
cp -a horizon $PKGCTL/root
find horizon -name '*.pyc' -delete
cd horizon && python setup.py install --root $PKGCTL
cd ..
}
#!/bin/bash
# Playground to help me figure out how to package horizon
AUFS=aufs-temp
PKGCTL=openstack-etc
PKGHO=/tmp/openstack-horizon
test_horizon-setup() {