Skip to content

Instantly share code, notes, and snippets.

Recommended Reading List for Developers 1st Half 2014

The Recommended Reading List is a valuable resource for technical professionals who want to thoroughly explore topics such as multi-core programming, embedded, security, and more. Dozens of industry technologists, corporate fellows, and engineers have helped by suggesting books and reviewing the list.

Books For Hardware Developers

Power and Thermal Management

  • Power Management in Mobile Devices - Findlay Shearer - Newnes - 9780750679589
  • Thermal and Power Management of Integrated Circuits - Arman Vassighi, Manoj Sachdev - Springer - 9781441938329
@tuantm8
tuantm8 / network-traffic.sh
Last active October 29, 2016 15:21
Here is a shell script to see how many (kilo-, mega-, giga-, terra-) bytes pass a network interface. Source: http://meinit.nl/shell-script-measure-network-throughput-linux-machines
#!/bin/sh
usage(){
echo "Usage: $0 [-i INTERFACE] [-s INTERVAL] [-c COUNT]"
echo
echo "-i INTERFACE"
echo " The interface to monitor, default is eth0."
echo "-s INTERVAL"
echo " The time to wait in seconds between measurements, default is 3 seconds."
echo "-c COUNT"
@tuantm8
tuantm8 / install_dotnetcore.sh
Last active October 29, 2016 16:20
Script to install dotnetcore for debian based-os. Reference: https://www.microsoft.com/net/core#debian
#!/bin/bash
#
# Run with root
#
apt-get install curl libunwind8 gettext libicu52 liblttng-ust0 libssl1.0.0 liblldb-3.6 -y
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=827530
mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet
ln -s /opt/dotnet/dotnet /usr/local/bin
rm -f dotnet.tar.gz
echo "Done"
@tuantm8
tuantm8 / build_daemontools.md
Last active November 29, 2021 17:32
Howto compile Bernstein’s daemontools. Source: http://siyahsapkaorg.blogspot.com/2015/05/howto-compile-bernsteins-daemontools-on.html #daemontools #multilog #envdir

###Problem: aokanx@aokanx-VirtualBox:~/Downloads/admin/daemontools-0.76$ ./package/install Linking ./src/* into ./compile... Compiling everything in ./compile... sh find-systype.sh > systype rm -f compile sh print-cc.sh > compile ... ./load envdir unix.a byte.a /usr/bin/ld: errno: TLS definition in /lib/x86_64-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in envdir.o

@tuantm8
tuantm8 / snort_emerging_rules.sh
Created November 2, 2016 03:44
Get Emerging Ruleset for Snort
#!/bin/bash
#
#
if [ -d /etc/snort/rules ]; then
cd /etc/snort/rules
else
echo "/etc/snort/rules does not exist"
quit
fi
@tuantm8
tuantm8 / CMemoryExecute.cs
Created November 8, 2016 06:49
Runs an EXE in memory using native WinAPI. Very optimized and tiny.
using System;
using System.Runtime.InteropServices;
/*
* Title: CMemoryExecute.cs
* Description: Runs an EXE in memory using native WinAPI. Very optimized and tiny.
*
* Developed by: affixiate
* Release date: December 10, 2010
* Released on: http://opensc.ws
@tuantm8
tuantm8 / avoid-sleep.vbs
Created November 15, 2016 08:33
Avoid Computer to sleep
Dim objResult
Set objShell = WScript.CreateObject("WScript.Shell")
i = 0
Do While i = 0
objResult = objShell.sendkeys("{NUMLOCK}{NUMLOCK}")
Wscript.Sleep (6000)
Loop
@tuantm8
tuantm8 / split-file.vbs
Created November 30, 2016 03:40
A Vbs script to split big file to smaller files
'--------------------------------
' Split a file into smaller chunks
' 20161130
' CmdLine: {this-script} {path to big file} {size in MB} {output}
' To use with cli: cscript {this-script} {path to big file} {size in KB} {output}
'--------------------------------
LF = Chr(10)
Dim oFSO, FullName, Path, Name, Size, TargetDir, Filename
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oWSH = CreateObject("WScript.Shell")
vbsInterpreter = "cscript.exe"
Call ForceConsole()
Function printf(txt)
WScript.StdOut.WriteLine txt
End Function
Function printl(txt)
@tuantm8
tuantm8 / RunMeAsCScript.vbs
Created November 30, 2016 03:45
Force a vbs script to run in cscript engine
RunMeAsCScript
'do whatever you want; anything after the above line you can gaurentee you'll be in cscript
Sub RunMeAsCScript()
Dim strArgs, strCmd, strEngine, i, objDebug, wshShell
Set wshShell = CreateObject( "WScript.Shell" )
strEngine = UCase( Right( WScript.FullName, 12 ) )
If strEngine <> "\CSCRIPT.EXE" Then
' Recreate the list of command line arguments