Skip to content

Instantly share code, notes, and snippets.

View BernardoGO's full-sized avatar

Bernardo Augusto Godinho de Oliveira BernardoGO

  • Pontifical Catholic University of Minas Gerais
  • Belo Horizonte - Brazil
View GitHub Profile
yaourt clutter-git
@BernardoGO
BernardoGO / command.txt
Created May 1, 2016 09:02
To run steam games with primus
LD_PRELOAD="libpthread.so.0 libGL.so.1" GL_THREADED_OPTIMIZATIONS=1 ionice -c 2 -n 0 primusrun %command%
running: 343
[]
['0(1/10)', '0(1/10)', '1(3/10)', '1(3/10)', 'NOP', '2(5/25)', '3(7/25)', '3(7/25)', '4(9/35)', '4(9/35)', '0(11/20)', '0(11/20)', '1(13/20)', '1(13/20)', '5(15/35)', '5(15/35)', '6(17/70)', '6(17/70)', '7(19/70)', '7(19/70)', '0(21/30)', '0(21/30)', '1(23/30)', '1(23/30)', 'NOP', '2(25/45)', '3(27/45)', '3(27/45)', 'NOP', 'NOP', '0(31/40)', '0(31/40)', '1(33/40)', '1(33/40)', 'NOP', 'NOP', 'NOP', 'NOP', 'NOP', 'NOP', '0(41/50)', '0(41/50)', '1(43/50)', '1(43/50)', 'NOP', '2(45/65)', '3(47/65)', '3(47/65)', '4(49/75)', '4(49/75)', '0(51/60)', '0(51/60)', '1(53/60)', '1(53/60)', '5(55/75)', '5(55/75)', 'NOP', 'NOP', 'NOP', 'NOP', '0(61/70)', '0(61/70)', '1(63/70)', '1(63/70)', 'NOP', '2(65/85)', '3(67/85)', '3(67/85)', 'NOP', 'NOP', '0(71/80)', '0(71/80)', '1(73/80)', '1(73/80)', 'NOP', 'NOP', 'NOP', 'NOP', 'NOP', 'NOP', '0(81/90)', '0(81/90)', '1(83/90)', '1(83/90)', 'NOP', '2(85/105)', '3(87/105)', '3(87/105)', '4(89/115)', '4(89/115)', '0(91/100)', '0(91/100)', '1(93/100)', '1(93/100)', '5(9
scp godin040@phi05.cselabs.umn.edu:/export/scratch/CSCI5161/PA3/parser /home/bernardo/projects
[Unit]
Description=Local system resume actions
After=suspend.target network.target
[Service]
Type=simple
ExecStart=-/etc/pm/sleep.d/66nvidia resume
[Install]
WantedBy=suspend.target
#! /bin/sh
GPUDRIVER=nvidia
#if [ ! -x /sys/bus/usb/devices/${BUS}-${DEVICE}/power/level ]; then
# exit 0
#fi
case "$1" in
suspend|suspend_hybrid|hibernate)
#! /bin/sh
GPUDRIVER=nvidia
#if [ ! -x /sys/bus/usb/devices/${BUS}-${DEVICE}/power/level ]; then
# exit 0
#fi
case "$1" in
suspend|suspend_hybrid|hibernate)
@BernardoGO
BernardoGO / P650SE_Suspend_Fix.sh
Last active March 20, 2016 00:15
Bash script used to fix suspend/resume on clevo computers that drains a lot of power while sleeping
#! /bin/sh
GPUDRIVER=nvidia
#if [ ! -x /sys/bus/usb/devices/${BUS}-${DEVICE}/power/level ]; then
# exit 0
#fi
case "$1" in
suspend|suspend_hybrid|hibernate)
@BernardoGO
BernardoGO / simplegui.py
Created November 29, 2015 20:15
Python Simple GUI to run another script
from Tkinter import *
root = Tk()
S = Label(root, text ="grupo:")
S.pack()
T = Text(root, height=2, width=30)
@BernardoGO
BernardoGO / OpenWithSublimeText3.bat
Created November 29, 2015 08:38
Add "Open with Sublime Text 3" to Windows Explorer Context Menu (including folders)
@echo off
SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f