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
#!/bin/sh | |
FRESH_KERNEL=$(ls -1 /boot/vmlinuz-*-generic | tail -n1 | egrep -o '[0-9]+.*') | |
dpkg -l linux-{image,headers}-* | awk '/^ii/{print $2}' | egrep '[0-9]+\.[0-9]+\.[0-9]+' | grep -v $(uname -r | cut -d- -f-2) | grep -v $FRESH_KERNEL | xargs apt -y purge |
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
#!/bin/sh | |
# | |
# put this file as /usr/local/bin/dmesg and make executable | |
# | |
if [ -n "$@" ]; then | |
/bin/dmesg $@ | |
else | |
/bin/dmesg -ukxTw | |
fi |
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
#!/bin/sh | |
set -e | |
FB="fastboot -S 512M" | |
#adb reboot bootloader | |
# Boot TWRP recovery | |
#${FB} oem unlock |
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
#!/bin/bash | |
OPTIONS="Centered Scaled Spanned Zoom Stretched Wallpaper Quit" | |
select opt in $OPTIONS; do | |
if [ "$opt" = "Centered" ]; then | |
gsettings set org.gnome.desktop.background picture-options "centered" | |
echo You choose the background-picture to be $opt ! | tr '[A-Z]' '[a-z]' | |
elif [ "$opt" = "Scaled" ]; then | |
gsettings set org.gnome.desktop.background picture-options "scaled" | |
echo You choose the background-picture to be $opt ! | tr '[A-Z]' '[a-z]' |
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
#ifndef _LINUX_LIST_H | |
#define _LINUX_LIST_H | |
#include <stdio.h> | |
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | |
/** | |
* container_of - cast a member of a structure out to the containing structure | |
* @ptr: the pointer to the member. |
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
Setup RaspberryPi: | |
mkdir -p /etc/ppp/scripts | |
cat > /etc/ppp/scripts/ppplogin <<EOF | |
#!/bin/sh | |
# ppplogin - script to fire up pppd on login | |
# Disable other users to write to the tty. | |
mesg n |
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
; in the name of ALLAH | |
; /etc/systemd/system/stunnel.service or /usr/lib/systemd/system/stunnel.service | |
; change "{{ config.conf }}" by your config path. | |
[Unit] | |
Description=SSL tunnel for network daemons | |
After=syslog.target | |
[Service] | |
ExecStart=/usr/sbin/stunnel {{ config.conf }} |
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
# article http://rodrigoberriel.com/2014/10/installing-opencv-3-0-0-on-ubuntu-14-04/ | |
# clone of https://github.com/borromeotlhs/node-opencv/blob/77e72273608387957340abe1f6a1a4608173fed1/Dockerfile | |
# This file describes how to build node-opencv into a runnable linux container with all dependencies installed | |
# To build: | |
# 1) Install docker (http://docker.io) | |
# 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/node-opencv < Dockerfile | |
# 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)" | |
# | |
# VERSION 0.3 | |
# DOCKER-VERSION 8.1.2 |
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
/* ***** BEGIN LICENSE BLOCK ***** | |
* Version: MPL 2.0 | |
* | |
* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
* | |
* ***** END LICENSE BLOCK ***** */ | |
/* |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.2.6 (GNU/Linux) | |
mQGiBEK/0MURBACv5Rm/jRnrbyocW5t43hrjFxlw/DPLTWiA16apk3P2HQQ8F6cs | |
EY/gmNmUf4U8KB6ncxdye/ostSBFJmVYh0YEYUxBSYM6ZFui3teVRxxXqN921jU2 | |
GbbWGqqlxbDqvBxDEG95pA9oSiFYalVfjxVv0hrcrAHQDW5DL2b8l48kGwCgnxs1 | |
iO7Z/5KRalKSJqKx70TVIUkD/2YkkHjcwp4Nt1pPlKxLaFp41cnCEGMEZVsNIQuJ | |
1SgHyMHKBzMWkD7QHqAeW3Sa9CDAJKoVPHZK99puF8etyUpC/HfmOIF6jwGpfG5A | |
S7YbqHX6vitRlQt1b1aq5K83J8Y0+8WmjZmCQY6+y2KHOPP+zHWKe5TJDeqDnN0j | |
sZsKA/441IF4JJTPEhvRFsPJO5WKg1zGFbxRPKvgi7+YY6pJ0VFbOMcJVMkvSZ2w |