Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🚀
coding something...

Ashley Clarke clarkeash

👨‍🚀
coding something...
View GitHub Profile
@clarkeash
clarkeash / snippet.xml
Created Sep 15, 2012 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
View snippet.xml
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
@clarkeash
clarkeash / application.php
Created Sep 10, 2012
Laravel Application config
View application.php
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application without a trailing slash. The URL
@clarkeash
clarkeash / Database.php
Created Aug 30, 2012
Database Class - PHP
View Database.php
<?php
class Database {
public static $conn;
public static function connect(){
try {
$conn = new PDO(DB_DRIVER.':host='.DB_HOST.';dbname='.DB_NAME.';', DB_USER, DB_PASSWORD);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
self::$conn = $conn;
@clarkeash
clarkeash / gist:3483943
Created Aug 26, 2012 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:3483943

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@clarkeash
clarkeash / gist:3469244
Created Aug 25, 2012 — forked from JeffreyWay/gist:3185773
PHP Installation Options
View gist:3469244
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-libxml-dir=/usr \
--with-openssl=/usr \
@clarkeash
clarkeash / Convert_Timestamp_Function.php
Created Jul 29, 2012
PHP Helper function for converting a timestamp.
View Convert_Timestamp_Function.php
<?php
function convert_timestamp($timestamp, $format) {
$exp = explode(" ", $timestamp);
$date = explode("-", $exp[0]);
$year = $date[0];
$month = $date[1];
$day = $date[2];
$time = explode(":", $exp[1]);
$hour = $time[0];
@clarkeash
clarkeash / example.php
Last active Aug 29, 2015
16-October-sample-post
View example.php
<?php
echo "hey, there!";
?>
View keybase.md

Keybase proof

I hereby claim:

  • I am clarkeash on github.
  • I am clarkeash (https://keybase.io/clarkeash) on keybase.
  • I have a public key whose fingerprint is 27AC 45CC 3588 C999 69F3 A3A8 5727 16D2 B57C C18F

To claim this, I am signing this object:

View Envoy.blade.php
/*
|--------------------------------------------------------------------------
| Basic Setup/Config
|--------------------------------------------------------------------------
*/
@setup
$directory = '/home/vagrant/laravel-apps/stubb-project';
@endsetup
/*
View gist:e0a67e738559a98e64ac
Config:
- Change scrolling direction
- Hide dock
- Create SSH key
- Pull in bash profile from github
Apps:
- Chrome
- Dropbox
- Alfred App