Skip to content

Instantly share code, notes, and snippets.

View dydx's full-sized avatar
🎯
Focusing

Josh Sandlin dydx

🎯
Focusing
View GitHub Profile
@dydx
dydx / functions.php
Last active August 29, 2015 14:18
general purpose functions.php, WIP
<?php
// footer creds and callbacks. fuck yeah.
add_filter('genesis_footer_creds_text', function() {
echo '<div class="creds"><p>';
echo 'Copyright &copy; ';
echo date('Y');
echo ' &middot; <a href="http://thenullbyte.org>the null byte</a>';
echo ' &middot; <a href="http://thenullbyte.org/wp-admin/>login</a>';
echo '</p></div>';
# this is my .env file
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomKey!!!
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
DB_CONNECTION=sqlite
---
ip: "192.168.10.10"
memory: 512
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
127.0.0.1 localhost
127.0.1.1 lear
127.0.0.1 homestead.app
127.0.0.1 wordpress.app
$ josh@lear:~/Development$ tree -L 2
└── PHP   
├── Homestead
└── wordpress

How to use

  1. Follow the linux documentation found here to install Visual Studio Code.
  2. Copy the contents of code.desktop to ~/.local/share/applications/code.desktop
  3. Change /home/dan/Apps/vsc in the code.desktop file to the location you extracted the application to.

This how only been tested by myself on ElementaryOS Freya.

<?php
// unordered list
$list = Array(
0 => 'My Images',
1 => 'Text Alignment',
2 => 'Your New Post',
3 => 'The More Tag',
4 => 'The Average Post',
5 => 'The Paginated'
'use strict';
// yay dumb code!
class RunLoop {
constructor(...fns) {
this.fns = fns;
}
run() {
for(var fn of this.fns) {
@dydx
dydx / laravel-model-factory.sublime-snippet
Created June 30, 2015 01:20
Sublime Snippet for Laravel Model Factories
<snippet>
<content><![CDATA[
\$factory->define(App\\${1}, function(\$faker) {
return [
${2}
];
});
]]></content>
<tabTrigger>modelfac</tabTrigger>
<scope>source.php</scope>
@dydx
dydx / laravel-snippets.sublime-snippet
Created July 3, 2015 06:49
Laravel / Sublime snippets
<snippet>
<content><![CDATA[
Schema::create('${1}', function(Blueprint $table) {
\$table->increments('id');
${2}
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>schema</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->