Skip to content

Instantly share code, notes, and snippets.

View JosephDuffy's full-sized avatar
🐒
Code monkey

Joseph Duffy JosephDuffy

🐒
Code monkey
View GitHub Profile
@JosephDuffy
JosephDuffy / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@JosephDuffy
JosephDuffy / gist:6001567
Created July 15, 2013 16:59
PHP Simple HTML DOM Parser bug?
<?php
require 'simple_html_dom.php';
class Page
{
protected $html;
public function __construct()
{
<script type="text/javascript" src="/javascript/js-faq.js"></script>
<?php
/**
* Required Auth: 3
* Name: Home Page
* Meta Description: I am the meta description of this page
*/
namespace Yetii;
$database = new Database();
#! /bin/sh
### BEGIN INIT INFO
# Provides: Mega Search
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Should-Start: $NetworkManager
# Should-Stop: $NetworkManager
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
{
// *nix based systems, Mac OS X and Linux
// - All commands on and using PATHS
// We want debugging on
"show_debug": true,
// Only execute for .php files
"extensions_to_execute": ["php"],
@JosephDuffy
JosephDuffy / fastlane.fish
Last active March 16, 2017 19:38
A simple fish script to provide tab completion of fastlane lanes
# Author: Joseph Duffy
# License: MIT
# Notes: Place this script in `~/.config/fish/completions/` to enable Fastlane lane completion
# URL: https://gist.github.com/JosephDuffy/e40fc115f849555c5ef8453d3ece1c10
# This function was taken from https://github.com/Carthage/Carthage/blob/master/Source/Scripts/carthage-fish-completion
function __fish_prog_needs_subcommand
set cmd (commandline -opc)
if [ (count $cmd) -eq 1 -a $cmd[1] = 'fastlane' ]
return 0
import Foundation
extension Dictionary {
subscript(keys: String...) -> Any? {
var value: Any = self
for key in keys {
guard let dictionary = value as? [String: Any] else { return nil }
guard let newValue = dictionary[key] else { return nil }
import * as React from 'react';
import { ScrollView } from 'react-native';
class Foo extends React.Component {
private scrollView: ScrollView;
render() {
return (
<ScrollView
@JosephDuffy
JosephDuffy / keybase.md
Last active April 21, 2018 17:26
keybase.md

Keybase proof

I hereby claim:

  • I am josephduffy on github.
  • I am josephduffy (https://keybase.io/josephduffy) on keybase.
  • I have a public key ASBeGhM8RITtTJSpJG6YexBC2RqJkf5uaM3U5jndy8vNhwo

To claim this, I am signing this object: