This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
available=$(brew list --formula -1 | egrep '^php@|^php$') | |
syntax () { | |
echo "SYNTAX: $0 <version>" | |
echo "" | |
echo -n "<version> needs to be one of: " | |
echo $available | |
echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/** | |
* This script monitors a folder for changes and forces a change in the inode or file-modification time | |
* if it detects a change or deletion. | |
* | |
* Basically it's a PHP re-implementation of https://github.com/sillypog/inotify-proxy | |
* | |
* I do this because docker-sync was not copying changes from my MacOS folder to volume that was used by | |
* my docker container. And docker-sync is the only way to get a FAST filesystem if you're using Docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use \League\OAuth2\Server\ResourceServer; | |
use \Laravel\Passport\TokenRepository; | |
use \Laravel\Passport\Guards\TokenGuard; | |
use \Laravel\Passport\ClientRepository; | |
use \Illuminate\Support\Facades\Auth; | |
use \Illuminate\Http\Request; | |
function getUser($bearerToken) { | |
$tokenguard = new TokenGuard( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import PropTypes from "prop-types" | |
import {CachedImage} from "react-native-img-cache" | |
class CachedImageMultiSource extends React.Component { | |
static propTypes = { | |
...CachedImage.propTypes, | |
source: PropTypes.arrayOf(PropTypes.object), | |
width: PropTypes.number.isRequired, | |
height: PropTypes.number.isRequired, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SCRIPTPATH=$(cd "$(dirname "$0")"; pwd -P) | |
while [ true ] | |
do | |
${SCRIPTPATH}/status.sh >> ${SCRIPTPATH}/log.txt | |
sleep 10 | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: gogs | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Git repository manager Gogs | |
# Description: Starts and stops the self-hosted git repository manager Gogs | |
### END INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am infostreams on github. | |
* I am eakerboom (https://keybase.io/eakerboom) on keybase. | |
* I have a public key whose fingerprint is 292A 017B B43A 39E0 635B 5C77 D999 A61C 8C2B 4D1C | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.bindFirst = function(which, handler) { | |
// ensures a handler is run before any other registered handlers, | |
// independent of the order in which they were bound | |
var $el = $(this); | |
$el.unbind(which, handler); | |
$el.bind(which, handler); | |
var events = $._data($el[0]).events; | |
var registered = events[which]; | |
registered.unshift(registered.pop()); |