Skip to content

Instantly share code, notes, and snippets.

View ssx's full-sized avatar

Scott Robinson ssx

View GitHub Profile
@ssx
ssx / twitter_keyboard_shortcuts.txt
Created December 29, 2018 10:29
Twitter Keyboard Shortcuts
n - New Tweet gh - Home
l - Like go - Moments
r - Reply gn - Notifications
t - Retweet gr - Mentions
m - Direct message gp - Profile
u - Mute User gl - Likes
b - Block User gi - Lists
Enter - Open Tweet details gm - Messages
o - Expand photo gs - Settings
/ - Search gu - Go to user
<?php
namespace App\Nova;
use App\Nova\Actions\ExportOrders;
class Order extends Resource
{
// snipped..
<?php
namespace App\Nova\Actions;
use App\Models\Order;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
use Maatwebsite\LaravelNovaExcel\Actions\DownloadExcel;
use PhpOffice\PhpSpreadsheet\Shared\Date;
<?php
function main(array $args) : array
{
$name = $args['name'] ?? 'stranger';
$greeting = 'Hello '.$name.'!';
return [
'statusCode' => 201,
'headers' => [
'X-Header-Test' => 'Something shiny',
<?php
function parse(array $args) : array
{
try {
// You could do something with these like calculating the time
// it look to run the job.
$started_at = $args["started_at"];
$completed_at = $args["completed_at"];
// If the job passed, we'll send it to the #ops channel, however
@ssx
ssx / .pre-commit-config.yaml
Created September 7, 2017 17:08
PHP Pre-Commit Example
- repo: https://github.com/digitalpulp/pre-commit-php.git
sha: 1.3.0
hooks:
- id: php-lint
- id: php-unit
- id: php-cbf
files: \.(php)$
args: [--standard=PSR2 --ignore=**/*.blade.php -p]
- id: php-cs
files: \.(php)$
- repo: [email protected]:hootsuite/pre-commit-php.git
sha: 1.2.0
hooks:
- id: php-lint
- id: php-unit
- repo: git://github.com/pre-commit/pre-commit-hooks.git
sha: 5bf6c09bfa1297d3692cadd621ef95f1284e33c0
hooks:
- id: trailing-whitespace
- id: detect-private-key

Keybase proof

I hereby claim:

  • I am ssx on github.
  • I am ssx (https://keybase.io/ssx) on keybase.
  • I have a public key ASD3dyzssp8apFrv6F4-HPwhGhmA6-kuOD7qPOoFZVgAygo

To claim this, I am signing this object:

@ssx
ssx / .gitlab-ci.yml
Created April 15, 2017 07:54
.gitlab-ci.yml for Appcelerator CI testing
image: hellossx/appcelerator-ci
variables:
JAVA_HOME: "/usr/lib/jvm/java-8-oracle/"
ANDROID_HOME: "/usr/local/android/android-sdk-linux"
cache:
key: "costings_app"
untracked: true
stages:
- test
npm_tasks:
@ssx
ssx / test.js
Created April 12, 2017 08:21
test.js
exports.sendViaBluetooth = function(file, title) {
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_SEND
});
// File contains a tifileobject.nativePath
intent.putExtraUri(Ti.Android.EXTRA_STREAM, file);
var share = Ti.Android.createIntentChooser(intent, title);