wget http://gcc.parentingamerica.com/releases/gcc-5.5.0/gcc-5.5.0.tar.xz
- untar and cd
./contrib/download_prerequisites
cd .. && mkdir gcc-build && cd gcc-build && ../gcc-5.5.0/configure --prefix=
pwd/inst --disable-multilib
unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE
make -j3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Notifies the user if the battery is low. | |
# Executes some command (like hibernate) on critical battery. | |
# This script is supposed to be called from a cron job. | |
function notify-send() { | |
# Detect the name of the display in use | |
local display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function notify-send() { | |
# Detect the name of the display in use | |
local display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" | |
# Detect the user using such display | |
local user=$(who | grep '('$display')' | awk '{print $1}' | head -n 1) | |
# Detect the id of the user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEMS=="input", ATTRS{name}=="Keychron K2", RUN+="/bin/sh -c 'echo 0 > /sys/module/hid_apple/parameters/fnmode'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
biar@pfp-VirtualBox:~$ python2 -m pip install --user pip | |
biar@pfp-VirtualBox:~$ python -m pip install --user angr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
gcc -o main-i386 main.c -m32 | |
mips-linux-gnu-gcc -o main-mips main.c | |
clean: | |
-rm main-i386 main-mips | |
gen: | |
objdump -d main-i386 | grep '<avoid>' | cut -f1 -d' ' | head -n 1 > avoid-i386.txt | |
objdump -d main-mips | grep '<avoid>' | cut -f1 -d' ' | head -n 1 > avoid-mips.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
export PATH=/home/ercoppa/Desktop/code/llvm-3.4-cmake/bin:$PATH | |
./configure --make-llvm-lib | |
make | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.globl foo | |
.text | |
foo: | |
movl 4(%esp), %eax # load arg0 into eax | |
leal (foo_real), %ecx | |
jmp *%ecx | |
.data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/hadoop/sbin/ | |
# save old scripts | |
mv start-dfs.sh start-dfs.sh.orig | |
mv start-yarn.sh start-yarn.sh.orig | |
mv stop-dfs.sh stop-dfs.sh.orig | |
mv stop-yarn.sh stop-yarn.sh.orig | |
touch start-dfs.sh && chmod +x start-dfs.sh | |
touch start-yarn.sh && chmod +x start-yarn.sh |