Skip to content

Instantly share code, notes, and snippets.

View avataru's full-sized avatar

Mihai Zaharie avataru

View GitHub Profile
@avataru
avataru / M10.csv
Created February 13, 2025 15:27
Nut and bolt inserts parameters. They can be imported into Fusion360 and used directly without the need to print anything just for a visual aid. To enable parameter import/export you need to install a plugin published by AutoDesk on their app store. These are intended as an alternative to ALCH M-Hardware Design Boards, to save plastic.
SlipFitBoltDiameter mm 10.3 mm
HexNutThickness mm 8.1 mm
PressFitHexNutWidth mm 16.9 mm
SlipFitHexNutWidth mm 17.2 mm
SquareNutThickness mm 5.3 mm
PressFitSquareNutWidth mm 17.1 mm
SlipFitSquareNutWidth mm 17.3 mm
CounterBoreDiameter mm 16.3 mm
CounterBoreDepth mm 0.0 mm
CounterSunkDiameter mm 20.2 mm
@avataru
avataru / animated-link.css
Created July 4, 2018 10:17
Animated hover on links
@avataru
avataru / EloquentCheatSheet.md
Last active April 18, 2025 21:40
Eloquent relationships cheat sheet
@avataru
avataru / Bitmask.php
Created August 24, 2016 09:05
Bitmask class
class Bitmask
{
private $bitmask;
public function __construct($bitmask = 0)
{
$this->bitmask = $bitmask;
}
public function set($bit, $value)
@avataru
avataru / General.md
Last active August 29, 2015 14:26
Awesome resources
@avataru
avataru / Util.php
Created April 15, 2015 14:44
Check link validity
Class Util
{
/**
* Validates the given Link is broken or not
*
* Prerequisite
* - cUrl
*
* Conditions:
* - Valid if HTTP Status in (200,301, 302, 303, 307)
@avataru
avataru / Aliases-GIT.md
Last active August 29, 2015 14:15
Git aliases

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"
# 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 November 14, 2014 14:38
List sub-folders in location
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
@avataru
avataru / sass-watch.bat
Last active August 29, 2015 14:09
SASS watcher
@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