Skip to content

Instantly share code, notes, and snippets.

View matheuseduardo's full-sized avatar
:octocat:
coding

Matheus Eduardo Silva Guimarães matheuseduardo

:octocat:
coding
View GitHub Profile
@matheuseduardo
matheuseduardo / never-settle.md
Created March 7, 2017 17:06
never settle ascii
/*                                                         __    __    ___             
*                                                         /\ \__/\ \__/\_ \            
*    ___     __   __  __     __   _ __         ____     __\ \ ,_\ \ ,_\//\ \      __   
*  /' _ `\ /'__`\/\ \/\ \  /'__`\/\`'__\      /',__\  /'__`\ \ \/\ \ \/ \ \ \   /'__`\ 
* /\ \/\ \/\  __/\ \ \_/ |/\  __/\ \ \/      /\__, `\/\  __/\ \ \_\ \ \_ \_\ \_/\  __/ 
* \ \_\ \_\ \____\\ \___/ \ \____\\ \_\      \/\____/\ \____\\ \__\\ \__\/\____\ \____\
*  \/_/\/_/\/____/ \/__/   \/____/ \/_/       \/___/  \/____/ \/__/ \/__/\/____/\/____/                                                                                     
*/
@matheuseduardo
matheuseduardo / start-all-packages.bat
Last active August 17, 2016 17:57
start all packages from android via script
@echo off
:: list all packages (-3 = only thidy parts)
adb shell 'pm list packages -3 > /sdcard/packages.txt';
:: get file
adb pull -p "/sdcard/packages.txt" "packages.txt";
@matheuseduardo
matheuseduardo / adb.sh
Created August 14, 2016 04:37
android adb commands
# Toggle Airplane Mode
# http://stackoverflow.com/questions/10506591/turning-airplane-mode-on-via-adb
am start -a android.settings.AIRPLANE_MODE_SETTINGS && input keyevent 19 && input keyevent 23 && input keyevent 4
# Turn on:
adb shell settings put global airplane_mode_on 1
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true
@matheuseduardo
matheuseduardo / .gitignore
Created July 18, 2016 14:34
gitignore - cakephp 2.x
*~
*.bak
build
.buildpath
compass
_compass.scss
composer.lock
desktop.ini
.DS_Store
.idea
@matheuseduardo
matheuseduardo / type.js
Last active June 17, 2016 19:23
get type of objects, errors, etc. in javascript
var type = (function (global) {
var cache = {};
return function (obj) {
var key;
return obj === null ? 'null' // null
: obj === global ? 'global' // window in browser or global in nodejs
: (key = typeof obj) !== 'object' ? key // basic: string, boolean, number, undefined, function
: obj.nodeType ? 'object' // DOM element
: cache[key = ({}).toString.call(obj)] // cached. date, regexp, error, object, array, math
|| (cache[key] = key.slice(8, -1)); // get XXXX from [object XXXX], and cache it
# EXTRACTED FROM http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
#rev. 1 - list all aliases (no check, no format, no validation)
# if user is not root, pass all commands via sudo #
if [ $UID -ne 0 ]; then
alias reboot='sudo reboot'
alias update='sudo apt-get upgrade'
fi
@matheuseduardo
matheuseduardo / inflections.php
Last active March 15, 2016 19:18
arquivo inflections.php para CakePHP 2.X na língua PT-BR
<?php
/**
* Ajustes das inflections para português
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @author Juan Basso <jrbasso@gmail.com>
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
@matheuseduardo
matheuseduardo / sample.php
Last active February 22, 2016 12:45 — forked from miguelfrmn/simpleimage.php
SimpleImage PHP Class
<?php
require_once('simpleimage.class.php');
// Usage:
// Load the original image
$image = new SimpleImage('lemon.jpg');
// Resize the image to 600px width and the proportional height
$image->resizeToWidth(600);
Verifying that +matheuseduardo is my blockchain ID. https://onename.com/matheuseduardo
@matheuseduardo
matheuseduardo / fix purple-black textures.md
Last active January 7, 2016 02:18
How to fix purple and black textures in CS Pro Mod (1.1) after install

This requires Counter-Strike Source to be brought for your Steam account

  1. Install Counter-Strike Source and Source SDK Base 2007.

  2. In the \steamapps\common\Source SDK Base 2007 folder create a new folder called cstrike.

  3. Then download the GCFscape Installer and install it. I used the "GCFScape v1.8.5 Full" version.

  4. Open GCFscape and click on File > Open and go to steamapps/common/Counter-Strike Source/cstrike and find the cstrike_pak_dir.vpk file and then press Open.