Skip to content

Instantly share code, notes, and snippets.

Bernardo Augusto Godinho de Oliveira BernardoGO

Block or report user

Report or block BernardoGO

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:499d3a2f734b7f12f56a
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
namespace Reflect
{
///by: Bernardo Godinho <bernardo.godinho.oliveira@gmail.com>
class ReflectionValues
View gist:b7400c15f1cde205bb13
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace XMLSK
{
///by: Bernardo Godinho <bernardo.godinho.oliveira@gmail.com>
static class XMLhl
View gist:430742263e3fc828f461
/******************************************************************************/
/* Files to Include */
/******************************************************************************/
//by: BernardoGO
#if defined(__XC)
#include <xc.h> /* XC8 General Include File */
#elif defined(HI_TECH_C)
#include <htc.h> /* HiTech General Include File */
View gist:e66e229ddef35d7edb37
bernardo@bernardo-P650SE-A:~$ uname -a
Linux bernardo-P650SE-A 3.19.0-31-generic #36~14.04.1-Ubuntu SMP Thu Oct 8 10:21:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
bernardo@bernardo-P650SE-A:~$ sh get-acpi-info.sh
Dumping ACPI tables...
[sudo] password for bernardo:
Intel ACPI Component Architecture
ACPI Binary Table Extraction Utility version 20140214-64 [Mar 29 2014]
Copyright (c) 2000 - 2014 Intel Corporation
View gist:bf80325026c62902bbf1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include "message.h"
#include <cstring>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
View gist:cfaaa358daabafd39976
#!/bin/sh
echo small-
if diff /home/bernardo/Downloads/pa2/server/input_small.txt /home/bernardo/Projects/redes2/input_small.txt >/dev/null ; then
echo Same
else
echo Different
fi
echo medium-
if diff /home/bernardo/Downloads/pa2/server/input_medium.txt /home/bernardo/Projects/redes2/input_medium.txt >/dev/null ; then
@BernardoGO
BernardoGO / OpenWithSublimeText3.bat
Created Nov 29, 2015
Add "Open with Sublime Text 3" to Windows Explorer Context Menu (including folders)
View OpenWithSublimeText3.bat
@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
@BernardoGO
BernardoGO / simplegui.py
Created Nov 29, 2015
Python Simple GUI to run another script
View simplegui.py
from Tkinter import *
root = Tk()
S = Label(root, text ="grupo:")
S.pack()
T = Text(root, height=2, width=30)
@BernardoGO
BernardoGO / P650SE_Suspend_Fix.sh
Last active Mar 20, 2016
Bash script used to fix suspend/resume on clevo computers that drains a lot of power while sleeping
View P650SE_Suspend_Fix.sh
#! /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)
View Shit_on
#! /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)
You can’t perform that action at this time.