Skip to content

Instantly share code, notes, and snippets.

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

Bogdan Rădulescu bogdanr

💭
:(){ :|:& };:
View GitHub Profile
#!/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() {
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 ..
}
@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
@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 / 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 / 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 / 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 / gist:59297a484f0ec8211a35
Created February 5, 2016 09:30
Kill long running processes in RDS
mysql -h __some_host__ -p __some_pass__ -r -s -e "select concat('CALL mysql.rds_kill(',id,');') from information_schema.processlist where command='Sleep' and time > 200;" > aaa.sql
@bogdanr
bogdanr / teclast.html
Created February 12, 2016 07:14
lshw Teclast X2
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="lshw-B.02.17" />
<style type="text/css">
.first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; }
.second {padding-left: 1em; width: 100%; vertical-align: center; }
.id {font-family: monospace;}
@bogdanr
bogdanr / config
Created April 1, 2016 09:16
zen-kernel 4.5 config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.5.0 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"