Skip to content

Instantly share code, notes, and snippets.

View haakym's full-sized avatar

Dominic haakym

  • London
View GitHub Profile
@haakym
haakym / cmd-qr.md
Last active November 27, 2023 07:01
Windows CMD Quick Reference

Files and Directories

Command Description
dir / a List directory including hidden files
dir * .png List any file that ends in ".png"
mkdir Make directory
rmdir /s Remove directory and contents
wmic logicaldisk get name List all drives
e: S witch drive
tree Folder structure
// https://disqus.com/home/discussion/laracast/3_more_unit_testing_review_in_phpunit_testing_with_laravel/#comment-2563747337
/** @test */
function ${1/\s/_/g}()
{
${0:// ${1:type name of method with spaces}}
}
@haakym
haakym / laravel-request.md
Created February 26, 2017 20:27
Laravel accessing the request object

So say you have a form like this:

<form method="POST" action="users/register">
	<input type="text" name="username">
	<button type="submit">Submit</button>
</form>

Then you want to access the request in your controller, you have a couple of methods...

@haakym
haakym / zpl-arabic-example.txt
Created March 22, 2017 09:57
ZPL to display Arabic text correctly (Example)
^XA
^FO50,50
^A@E:TT0003M_.TTF,N,50,50
^PA1,1,1,1
^FH
^FD
_D9_85_D8_AD_D8_A7_D9_83_D9_85_D8_A9
^FS
^XZ
@haakym
haakym / string-to-hex-for-zpl.js
Created March 22, 2017 11:58
String to Hex for ZPL in JS
function stringToHex(str) {
return str.split('').map(function (char) {
return '_' + char.charCodeAt(0).toString(16);
}).join('');
}
console.log(stringToHex('ش')); // _d8_b4
@haakym
haakym / zpl-useful-commands-reference.md
Last active March 29, 2017 10:10
ZPL Useful Command References from Zebra Website and Documentation
@haakym
haakym / zpl-command-reference.md
Last active November 23, 2021 03:17
ZPL Command Reference
  • ^A Scalable/Bitmapped Font
  • ^A@ Use Font Name to Call Font
  • ^B0 Aztec Bar Code Parameters
  • ^B1 Code 11 Bar Code
  • ^B2 Interleaved 2 of 5 Bar Code
  • ^B3 Code 39 Bar Code
  • ^B4 Code 49 Bar Code
  • ^B5 Planet Code bar code
  • ^B7 PDF417 Bar Code
  • ^B8 EAN-8 Bar Code
@haakym
haakym / user-aliases.cmd
Created July 28, 2017 10:19
Cmder User Aliases
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
e.=explorer .
gl=git log --oneline --all --graph --decorate $*
ls=ls --show-control-chars -F --color $*
pwd=cd
@haakym
haakym / update-laravel-installer.sh
Last active June 16, 2019 17:17
Update laravel installer
composer global update laravel/installer
@haakym
haakym / inspect-response-laravel.md
Created October 30, 2017 15:37
Inspect session, Laravel