Skip to content

Instantly share code, notes, and snippets.

View ubinix-warun's full-sized avatar
🎯
Focusing

Warun C. ⚡ ubinix-warun

🎯
Focusing
View GitHub Profile
@ubinix-warun
ubinix-warun / install-cloud9.bash
Last active July 25, 2016 00:50
Install Cloud9 IDE on Ubuntu 12.04, Raspberry Pi
cd ~
sudo npm install -g sm
sudo apt-get install git-core libxml2-dev
git clone https://github.com/ajaxorg/cloud9.git cloud9
cd ./cloud9
sudo sm install
...
@ubinix-warun
ubinix-warun / hostapd-dn.bash
Last active December 18, 2015 21:09
Work on Ubuntu 13.04, Raspberry Pi Ref: www.pi-point.co.uk/documentation/
#ifconfig wlan0 192.168.1.1
cp /etc/dnsmasq.conf.bk /etc/dnsmasq.conf
#echo "interface=wlan0" > /etc/dnsmasq.conf
#echo "dhcp-range=192.168.1.5,192.168.1.254,255.255.255.0,12h" >> /etc/dnsmasq.conf
/etc/init.d/dnsmasq restart
rm hostapd.conf
#echo "interface=wlan0
#driver=nl80211
@ubinix-warun
ubinix-warun / runner.sh
Last active December 25, 2015 06:19
Live QMLtestrunner with 'inotifywait' on Bash script
#!/bin/bash
BLD="$(tput bold)"
GRN="$(tput setab 2)"
RED="$(tput setab 1)"
BLK="$(tput sgr0)"
function test {
clear
cd ./test
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.RMISecurityManager;
public class RmiClient {
// "obj" is the reference of the remote object
RmiServerIntf obj = null;
public String getMessage() {
try {
mkdir out dot
for f in $1/*.c;
do
filename=$(basename "$f")
echo "Processing ${filename%.*} file..";
cat $f | ./canalyze > ./dot/${filename%.*}.dot; dot -Tpng ./dot/${filename%.*}.dot -o ./out/${filename%.*}.png
done
echo "-------------------------------------------------------";
ls ./out/* -al | awk '{ print $5 "\t" $9 }' | sort -n
@ubinix-warun
ubinix-warun / serial-expect.sh
Created March 23, 2014 12:33
Tcl/Expect Script for Receive and Send over Serial-Port ttyX http://embeddedfreak.wordpress.com/2007/09/24/logging-serial-port-data/
#! /bin/sh
# the next line restarts using expect \
exec expect $0 ${1+"$@"}
#!/usr/local/bin/expect -f
#
# serialWatch.exp
# Connect up to a device on a serial port
# Time stamp any incoming lines to stdout
mtype {MSG, ACK};
chan toS = [2] of {mtype, bit};
chan toR = [2] of {mtype, bit};
proctype Sender(chan inp, out)
{
bit sendbit, recvbit;
do
:: out ! MSG, sendbit ->
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@ubinix-warun
ubinix-warun / run-emulator.sh
Created April 19, 2014 17:01
run-emulator.sh edited, scale ubuntu-touch display to 0.7 on line 50. Ref: http://www.webupd8.org/2014/03/ubuntu-touch-x86-emulator-better.html
#!/bin/sh
#
# run-emulator.sh -- execute emulator with correct args
#
# Copyright (C) 2013, Canonical Ltd.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.