Skip to content

Instantly share code, notes, and snippets.

:octocat:
coding

Matheus Eduardo Silva Guimarães matheuseduardo

:octocat:
coding
Block or report user

Report or block matheuseduardo

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 .bash_profile
PASTAINICIO=$(pwd);
PATHHEADER="$PASTAINICIO/.header"
if (test -r $PATHHEADER)
then
cat $PATHHEADER;
fi
@matheuseduardo
matheuseduardo / DCIM-sizes.sh
Created Jan 22, 2019
shell script to list sizes of pics & vids
View DCIM-sizes.sh
anos=`seq 2016 2018`; # 2016 a 2018
meses=`seq -w 1 12`; # todos os meses
for ano in $anos
do
for mes in $meses
do
data=$ano$mes;
tam=`du -c DCIM/**/IMG_$data*.jpg DCIM/**/VID_$data*.mp4 2> /dev/null | tail -1 | cut -f 1`
echo $data: $tam
View gist:d0fb745529a9b9bedf654c708165e110
##Test
Exclude
##Books
Chrome
Movies
Music
##PlayGames
Talkback
View .gitalias
alias.lg log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
alias.alias config --get-regexp ^alias\.
alias.unadd reset HEAD --
alias.unstage reset HEAD --
@matheuseduardo
matheuseduardo / example.md
Last active Aug 30, 2018
subir arquivo para WebDAV via shell
View example.md
@matheuseduardo
matheuseduardo / GetrsSetrs.class.php
Created Aug 21, 2018
class with getters and setters predefined through magic methods
View GetrsSetrs.class.php
<?php
class GetrsSetrs {
public function __call($name, $arguments) {
$action = substr($name, 0, 3);
if ($action == 'get') {
return $this->get(lcfirst(substr($name, 3)));
}
else if ($action == 'set') {
View Db.class.php
<?php
class DB {
/**
* @var DB
*/
private static $instancia = NULL;
/**
* @var Mysql link identifier
@matheuseduardo
matheuseduardo / create-preview-from-video.sh
Created Jul 18, 2018
Create Short Preview from Video
View create-preview-from-video.sh
# source: https://davidwalsh.name/video-preview
# sample in PHP => https://gist.github.com/AkgunFatih/88c2241865c25e40a50edc4e24679a94
sourcefile=$1
destfile=$2
# Overly simple validation
if [ ! -e "$sourcefile" ]; then
echo 'Please provide an existing input file.'
@matheuseduardo
matheuseduardo / base64.inc.asp
Created Jul 12, 2018
Base64 encoding / decoding functions in VbScript / Classic ASP
View base64.inc.asp
<%
Function Base64Encode(sText)
Dim oXML, oNode
Set oXML = CreateObject("Msxml2.DOMDocument.3.0")
Set oNode = oXML.CreateElement("base64")
oNode.dataType = "bin.base64"
oNode.nodeTypedValue = Stream_StringToBinary(sText)
Base64Encode = oNode.text
Set oNode = Nothing
Set oXML = Nothing
@matheuseduardo
matheuseduardo / Cake Composer.md
Created Jul 9, 2018 — forked from ogrrd/Cake Composer.md
Install Cake 2.x with Composer
View Cake Composer.md

Install CakePHP 2.x with Composer

Remove the main CakePHP lib directory

$ cd /path/to/your/website
$ rm -Rf ./lib

Add the following composer.json file

You can’t perform that action at this time.