Skip to content

Instantly share code, notes, and snippets.

View j0rdsta's full-sized avatar

Jordan Gardiner j0rdsta

View GitHub Profile
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@mnbbrown
mnbbrown / gulpfile.js
Created March 16, 2016 22:18
gulp + webpack build process.
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');
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@bentleyo
bentleyo / TimesheetsSelect2.js
Last active February 3, 2020 21:10
Timesheets Select2 UserScript
// ==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
@juice49
juice49 / readme.md
Created November 30, 2012 16:53
Using the Laravel Validator, make a field required if another field is set to a given attribute.

Setup

  • Add this file to application/libraries (or, if you are already extending the Validator class, add the contents there).
  • Remove Validator alias from config/application.php in order to avoid conflicts.
  • Add "required_if_attribute" => "The :attribute field is required." to application/language/[language]/validation.php.

Usage

Define the rule using:

required_if_attribute:[field],[operator],[value]

@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu