Skip to content

Instantly share code, notes, and snippets.

@lukeberry99
lukeberry99 / restart.sh
Created July 30, 2019 18:45
Restart PufferPanel MC Server
#!/bin/bash
SERVER_IP=
SERVER_ID=
SECRET=
CLIENT_ID=
DELAY=10 # Delay in seconds
response=`curl -X POST ${SERVER_IP}/oauth2/token/request -d "grant_type=client_credentials&client_id=${CLIENT_ID}&client_secret=${SECRET}"`
token=$(expr "$response" : '.*"access_token":"\([^"]*\)"')
// Class
class Question {
constructor () {
super()
this.outcomes = [
{
id: 1,
name: 'Levy'
}
<template>
<div>
<TodoCard v-for="(todo, key) in todos" v-bind:todo="todo" v-bind:key="key" />
</div>
</template>
<script>
import TodoCard from './components/TodoCard'
export default {
data () {
return {

Keybase proof

I hereby claim:

  • I am lukeberry99 on github.
  • I am lukeberry99 (https://keybase.io/lukeberry99) on keybase.
  • I have a public key ASAXIx-8Pu91D_JH4N6AbgWbIxmjWjWWC7t8gP9E1shgUAo

To claim this, I am signing this object:

'use strict'
import gulp from 'gulp'
import browserSync from 'browser-sync'
import cssmin from 'gulp-cssmin'
import sass from 'gulp-sass'
import sourcemaps from 'gulp-sourcemaps'
import rename from 'gulp-rename'
import concat from 'gulp-concat'
import imagemin from 'gulp-imagemin'
APP_ENV=local
APP_DEBUG=true
APP_KEY=
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=
/**
* Rebuild the $_FILES array into a sane format.
*
* @param array $files
*
* @return array
*/
public function rebuildFilesArray($files)
{
$output = [];
@lukeberry99
lukeberry99 / testresults.txt
Created September 30, 2014 09:55
Karma spitting its dummy out
PhantomJS 1.9.7 (Mac OS X) Controller: DragdroptestCtrl should ... FAILED
Error: [$injector:modulerr] Failed to instantiate module stackedReviewApp due to:
Error: [$injector:modulerr] Failed to instantiate module ui.sortable due to:
Error: [$injector:nomod] Module 'ui.sortable' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.2.25/$injector/nomod?p0=ui.sortable
at /Users/luke/Projects/StackedReview/client/bower_components/angular/angular.js:1679
at ensure (/Users/luke/Projects/StackedReview/client/bower_components/angular/angular.js:1601)
at module (/Users/luke/Projects/StackedReview/client/bower_components/angular/angular.js:1892)
at /Users/luke/Projects/StackedReview/client/bower_components/angular/angular.js:3878
at forEach (/Users/luke/Projects/StackedReview/client/bowe
@lukeberry99
lukeberry99 / rm-cached.sh
Created September 5, 2014 07:38
Loop through committed files in git, find those that should be ignored and remove them from the cache
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached
@lukeberry99
lukeberry99 / konami.js
Last active August 29, 2015 14:03
Konami Code Directive http://luke-berry.co.uk/blog
app.directive('konami', function() {
return {
restrict: 'E',
link: function(scope, element, attrs) {
var keys = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65];
var i = 0;
$(document).keydown(function(e) {
if(e.keyCode === keys[i++]) {
if(i === keys.length) {
$(document).unbind('keydown', arguments.callee);