Skip to content

Instantly share code, notes, and snippets.

View john-crossley's full-sized avatar
🥔

John Crossley john-crossley

🥔
  • John Crossley
  • Manchester, England
View GitHub Profile
@john-crossley
john-crossley / install-laravel-mix.sh
Last active May 13, 2018 17:23
Installing Laravel Mix
cd super-awesome-vapor-app
npm init -y
npm install laravel-mix --save-dev
@john-crossley
john-crossley / simfolder.sh
Created March 24, 2018 18:25
Browse the filesystem of the iOS simulator
#!/bin/sh
cd ~/Library/Developer/CoreSimulator/Devices/
isVaildDeviceDir () {
# echo $1
# $1 is not directory or empty
if ! [[ -d $1 ]] || ! [[ -n $1 ]] ; then
return 1
fi
package jonnothebonno.me.veggiebeers.events
interface EventDispatchObserver {
fun didReceiveEvent(event: EventType)
}
@john-crossley
john-crossley / expand-collapse.java
Last active August 29, 2015 14:26 — forked from ZkHaider/expand-collapse.java
Simple Expand / Collapse RecyclerView Item
public static class ExampleViewHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
private int originalHeight = 0;
private boolean isViewExpanded = false;
private YourCustomView yourCustomView
public ExampleViewHolder(View v) {
super(v);
v.setOnClickListener(this);
"*":
"exception-reporting":
userId: "b9774f41-06f4-caa6-793d-fdf6850e45e2"
welcome:
showOnStartup: false
core:
disabledPackages: [
"jshint"
]
editor:
# Set sidebar icon size to medium
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
@john-crossley
john-crossley / gist:e207dd48f67f5dd8579a
Created January 9, 2015 20:02
Default (OSX).sublime-keymap
[
{ "keys": ["super+alt+n"], "command": "advanced_new_file_new"},
{ "keys": ["shift+super+alt+n"], "command": "advanced_new_file_new", "args": {"is_python": true}},
{
"keys": ["tab"],
"command": "insert",
"args": {"characters": "\t"},
"context": [{
"key": "setting.anf_panel"
}]
@john-crossley
john-crossley / Vagrantfile
Last active December 30, 2015 14:09
My default vagrant setup script
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
@john-crossley
john-crossley / .zshrc
Last active December 23, 2015 15:49
My zshrc more or less taken from some other guy (can't remember who)
#########
# COLORS
#########
autoload -U colors
colors
setopt prompt_subst
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
@john-crossley
john-crossley / Preferences.sublime-settings
Last active December 21, 2015 21:38
My sublime text config.
{
"auto_complete_commit_on_tab": false,
"bold_folder_labels": true,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"create_window_at_startup": false,
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_shadows": true,
"draw_white_space": "all",