Skip to content

Instantly share code, notes, and snippets.

View stamina321's full-sized avatar

stamina321

  • France
View GitHub Profile
gsettings set org.pantheon.terminal.settings palette "#070736364242:#DCDC32322F2F:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B3636:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3"
gsettings set org.pantheon.terminal.settings foreground "#838394949696"
gsettings set org.pantheon.terminal.settings background "#00002B2B3636"
gsettings set org.pantheon.terminal.settings cursor-color "#838394949696"
gsettings set org.pantheon.terminal.settings follow-last-tab "true"
Thanks https://gist.github.com/davidgomes/5162998
// GLSL shader autogenerated by cg2glsl.py.
#if defined(VERTEX)
#if __VERSION__ >= 130
#define COMPAT_VARYING out
#define COMPAT_ATTRIBUTE in
#define COMPAT_TEXTURE texture
#else
#define COMPAT_VARYING varying
@stamina321
stamina321 / .bashrc
Last active August 29, 2015 14:06
My tmux configuration.
# only one tmux session
[[ -z "$TMUX" ]] && (tmux attach || tmux new-session)
@stamina321
stamina321 / mshred.sh
Last active August 29, 2015 14:04
A recursive shred script. (work in progress)
#!/bin/sh
dir1="$1"
if [ -d "$dir1" ]; then
tmp="/tmp/$$"
find $dir1 -type f > $tmp
echo "Temporary file: $tmp"
@stamina321
stamina321 / ogg2mp3.sh
Created July 6, 2014 11:21
A script for convert ogg to mp3... Because sometime it's necessary.
#!/bin/bash
# convert *.ogg files to *.mp3 files preserve tag
# install vorbis-tools and lame with yum
function showhelp
{
script=`basename $0`
echo ""
echo "use: $script [options]"
echo ""
@stamina321
stamina321 / .bashrc
Created June 27, 2014 17:48
Prompt for notebook (battery status, 2 lines...). Copy the function et PS1 redefine in your ~/.bashrc.
function battery_status()
{
ACPI=`acpi`
BATTERY="/sys/class/power_supply/BAT1"
CAPACITY=`cat ${BATTERY}/capacity`
STATUS=`cat ${BATTERY}/status`
case "${STATUS:0:1}" in
"C") STATUS="+"
@stamina321
stamina321 / add_host.sh
Last active August 29, 2015 14:01
A short external script uzbl for store hostame of a selected url. It's useful for make a hosts blocker. Add @cbind in uzbl config file then mouse over a link and press x.
#!/bin/sh
# param
# $1 = selected_uri
# config
# @cbind x = spawn @config_home/uzbl/add_host.sh '\@SELECTED_URI'
DIR=`dirname $(realpath $UZBL_CONFIG)`
FILE="$DIR/hosts.uzbl"
URL="$1"
@stamina321
stamina321 / disable-services.sh
Last active August 29, 2015 14:00
Disable some services...
#!/bin/sh
systemctl disable abrt-ccpp.service
systemctl disable abrt-oops.service
systemctl disable abrt-xorg.service
systemctl disable abrtd.service
systemctl disable accounts-daemon.service
systemctl disable atd.service
systemctl disable crond.service
systemctl disable cups.service
@stamina321
stamina321 / Makefile
Created April 23, 2014 15:56
A generic Makefile (or makefile) for C project. Just change OUTFILE...
PREFIX=.
SRCDIR=$(PREFIX)/src
INCDIR=$(PREFIX)/include
BINDIR=$(PREFIX)/bin
CC=gcc
CPPFLAGS=-I$(INCDIR)
CFLAGS=-c -Wall -Werror --std=c99
LDFLAGS=
@stamina321
stamina321 / gdm_disable_user_list.sh
Created February 3, 2014 15:34
Disable gdm3 user list for better security. As root execute :
{
echo "[org/gnome/login-screen]"
echo "disable-user-list=true"
} > /etc/dconf/db/gdm.d/01-local-settings
dconf update
systemctl restart gdm