Skip to content

Instantly share code, notes, and snippets.

Mihai Zaharie avataru

Block or report user

Report or block avataru

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
@avataru
avataru / animated-link.css
Created Jul 4, 2018
Animated hover on links
View animated-link.css
@avataru
avataru / EloquentCheatSheet.md
Last active Oct 27, 2019
Eloquent relationships cheat sheet
View EloquentCheatSheet.md
View Bitmask.php
class Bitmask
{
private $bitmask;
public function __construct($bitmask = 0)
{
$this->bitmask = $bitmask;
}
public function set($bit, $value)
@avataru
avataru / General.md
Last active Aug 29, 2015
Awesome resources
View General.md
@avataru
avataru / Util.php
Created Apr 15, 2015
Check link validity
View Util.php
Class Util
{
/**
* Validates the given Link is broken or not
*
* Prerequisite
* - cUrl
*
* Conditions:
* - Valid if HTTP Status in (200,301, 302, 303, 307)
View Aliases-GIT.md

Better log
Usage: git lg (see log) or git lg -p (see changed lines)

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

Undo last commit (not pushed)
Usage: git undo

git config --global alias.undo "reset --soft HEAD~1"
View Aliases.sh
# https://github.com/ericboehs/dotfiles/tree/master/shell/aliases
alias yolo='git commit -am "DEAL WITH IT" && git push -f origin master'
alias sedit="gksudo gedit"
alias clean-boot="apt-get remove `dpkg --list 'linux-image*' |grep ^ii | awk '{print $2}'\ | grep -v \`uname -r\``"
@avataru
avataru / list-folders.bat
Created Nov 14, 2014
List sub-folders in location
View list-folders.bat
ECHO OFF
CLS
SET /P D=Choose the folder (ex.: g:\my folder):
ECHO.
DIR "%D%" /A:D-H-S /B /O:N > %USERPROFILE%\Desktop\Folders.txt
View sass-watch.bat
@ECHO OFF
CHOICE /C:NXCO /N /T:5 /D:C /M:"Output [N]ested, E[x]panded, [C]ompact or C[o]mpressed?"
SET ZONE=%ERRORLEVEL%
CLS
IF %ZONE% EQU 1 GOTO :Nested
IF %ZONE% EQU 2 GOTO :Expanded
IF %ZONE% EQU 3 GOTO :Compact
IF %ZONE% EQU 4 GOTO :Compressed
:Nested
You can’t perform that action at this time.