Skip to content

Instantly share code, notes, and snippets.

View pngmark's full-sized avatar
💭
Coding

Mark Png pngmark

💭
Coding
View GitHub Profile
@pngmark
pngmark / gist:af08ebe502ff391a5c5dc0fa52ae04da
Created November 21, 2017 09:13
Sample .htaccess file
#AuthType Basic
#AuthName "My Protected Area"
#AuthUserFile /path/to/.htpasswd
#Require valid-user
Options -Indexes
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
@pngmark
pngmark / http-status-codes-javascript
Created November 3, 2017 02:42
HTTP status codes for JavaScript array
var statusMessages = [
'200': 'OK',
'201': 'Created',
'200': 'OK',
'201': 'Created',
'202': 'Accepted',
'203': 'Non-Authoritative Information',
'204': 'No Content',
'205': 'Reset Content',
'206': 'Partial Content',
@pngmark
pngmark / http-status-codes-php
Last active November 3, 2017 02:42
HTTP status codes for PHP array
$statusMessages = [
200 => 'OK',
201 => 'Created',
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
@pngmark
pngmark / show-hidden-files-mac
Created July 15, 2016 06:03
Show hidden files on a Mac
// Open Terminal and run either the following command.
defaults write com.apple.finder AppleShowAllFiles YES
// Then hold ALT/OPTION key and right-click the Finder icon in the dock and select “relaunch”
// Use this command to hide hidden files again (Don’t forget to relaunch the Finder again).
defaults write com.apple.finder AppleShowAllFiles NO
<?php
// Original post on: https://medium.com/@theghostcoder/custom-laravel-valet-driver-61ede526861e
// Valet drivers are found at ~/.valet/Drivers
// You can create/edit Valet Drivers using Terminal with Nano/Vim; or
// Show hidden files on your Mac (See https://gist.github.com/markpng/f7ccccbe56acfa0746528e05443844e4)
// and use your favorite IDE.
class MyValetDriver extends ValetDriver
{