Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
const gulp = require('gulp'); | |
const browserSync = require('browser-sync'); | |
const path = require('path'); | |
const del = require('del'); | |
const sass = require('gulp-sass'); | |
const gutil = require('gulp-util'); | |
const webpack = require('webpack'); | |
const webpackDevMiddleware = require('webpack-dev-middleware'); | |
const webpackHotMiddleware = require('webpack-hot-middleware'); | |
const genWebpackConfig = require('./webpack.js'); |
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
// ==UserScript== | |
// @name Timesheets Select2 | |
// @namespace https://gist.github.com/Bentleyo/5933119/raw/TimesheetsSelect2.js | |
// @version 0.1.8 (this one is dedicated to Scotty) | |
// @description Replace awful timesheets select with select2 interface | |
// @match https://www.timesheets.com.au/* | |
// @copyright 2012+, Bentley O'Kane-Chase | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js |
"required_if_attribute" => "The :attribute field is required."
to application/language/[language]/validation.php.Define the rule using:
required_if_attribute:[field],[operator],[value]
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh