Skip to content

Instantly share code, notes, and snippets.

@jai-o
jai-o / stat-octal-file-permissions.md
Created May 15, 2019 17:33
Octal File Permission Info, Linux Terminal

stat -f %A directory stat -f %A filename

stat --help

@jai-o
jai-o / vagrant_halt.md
Created April 25, 2019 14:44
VAGRANT won't halt (Mac)

VAGRANT won't halt

by killing the process:

ps aux | grep VBox

kill $pid

@jai-o
jai-o / useful-mac-terminal-commands.md
Last active April 29, 2020 04:04
Useful Mac Terminal Commands
  • Flush DNS: sudo killall -HUP mDNSResponder
  • Show permissions: stat -c '%a - %n' *
@jai-o
jai-o / Ubuntu-desktop.md
Created February 18, 2019 20:59
Setup Ubuntu Desktop VirtualBox on macOS

Setup Ubuntu Desktop VirtualBox on macOS

Start

  • install virtualbox
  • install vagrant

Install an OS in virtualbox

There are several ways to do this, but a quick easy way to get a

@jai-o
jai-o / webserver-test-open-basedir-and-session-save-path
Last active December 18, 2015 10:28
WebServer: Test Open_basedir and Session.save_path
<?php echo (is_writable(session_save_path())) ? 'pass' : 'fail'; ?>
@jai-o
jai-o / invalid-page-uri.txt
Created November 14, 2012 01:36
eecms-errors: Invalid Page URI error
Invalid Page URI error
ExpressionEngine 2
EECMS2
maybe check your site_url configuration
or
maybe add site_url to your config file
@jai-o
jai-o / Contract Killer 3.md
Created November 8, 2012 15:42
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@jai-o
jai-o / git-config-commands.md
Created October 9, 2012 05:54
GIT: Config commands

GIT: Config commands

Typical configuration commands

git config --global user.name "Your Name"
git config --global user.email "example@example.com"

git config --global color.ui true

git config --global core.autocrlf input

@jai-o
jai-o / htaccess-try97
Created April 5, 2012 18:47
Works! Removes Index.php, Force HTTPS, removes www
RewriteEngine On
# Removes index.php
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1
# Depends on your web host and setup, check with your web host specific settings
RewriteCond %{ENV:SECURE_REDIRECT} !=on
@jai-o
jai-o / mac-terminal-cmds.md
Created January 22, 2012 20:37
MAC: Useful Mac OSX Terminal commands

Useful Mac OSX Terminal commands

Change Finder to show Hidden Files

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Change Finder to show Path

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES