Skip to content

Instantly share code, notes, and snippets.

View btn0s's full-sized avatar
🖤

b btn0s

🖤
View GitHub Profile
/*
Question:
Use the following code to implement a TaskRunner.
A TaskRunner takes a "task" function, and executes it.
The "task" function takes a "done" callback function which will be invoked when the task completes execution.
/etc/php/7.0/fpm/conf.d/10-opcache.ini,
/etc/php/7.0/fpm/conf.d/10-pdo.ini,
/etc/php/7.0/fpm/conf.d/15-xml.ini,
/etc/php/7.0/fpm/conf.d/20-apcu.ini,
/etc/php/7.0/fpm/conf.d/20-apcu_bc.ini,
/etc/php/7.0/fpm/conf.d/20-calendar.ini,
/etc/php/7.0/fpm/conf.d/20-ctype.ini,
/etc/php/7.0/fpm/conf.d/20-curl.ini,
/etc/php/7.0/fpm/conf.d/20-dom.ini,
{% set value = (value is null ? field.default : value) %}
{% if exists %}
<div class="form-field grid vertical">
<div class="form-label">
<label>{{ field.label|tu }}</label>
</div>
<div class="form-data form-uploads-wrapper">
<div id="grav-dropzone" class="dropzone"></div>
<span>{{ value|join("\n") }}</span>
@btn0s
btn0s / gulpApp.txt
Created December 3, 2015 02:42
Gulp.js file from the Foundation for Apps CLI template
// FOUNDATION FOR APPS TEMPLATE GULPFILE
// -------------------------------------
// This file processes all of the assets in the "client" folder, combines them with the Foundation for Apps assets, and outputs the finished files in the "build" folder as a finished app.
// 1. LIBRARIES
// - - - - - - - - - - - - - - -
var $ = require('gulp-load-plugins')();
var argv = require('yargs').argv;
var gulp = require('gulp');
@btn0s
btn0s / string search
Last active August 29, 2015 14:00
"Create a method to accept one arbitrary string as an argument, and return a string of length 26. The objective is to detect if letters of the alphabet (upper or lower case) are present anywhere in the string, and to set each of the 26 characters corresponding to each letter to either '1' if present, '0' if not."
@btn0s
btn0s / gist:11389343
Created April 29, 2014 02:24
How do I do a check if the input matches the key and value pair present in the hash?
class Sleigh
def authenticate(name, password)
# TODO
access = false
users = {"Santa Claus": "Ho Ho Ho!"}
if users[name] == "#{password}"
access = true
end
return access
@btn0s
btn0s / bank_proj
Last active August 29, 2015 14:00
this is a little bank project i got off ofa website im learning Ruby on. I have got the basic layout for seeing balance, depositing, withdrawing, etc... but there are a couple things i want to do. 1) maybe add more classes for the machine itself, a user that can have multiple accounts in his name 2) a "login/create user" startup in that machine …
class Account
attr_reader :name, :balance
def initialize(name, balance=100)
@name = name
@balance = balance
end
private
def pin
@pin = 1234