Skip to content

Instantly share code, notes, and snippets.

View ccharlton's full-sized avatar
🎯
Focusing

Chris Charlton ccharlton

🎯
Focusing
View GitHub Profile
@silvenon
silvenon / generator-webapp-with-compass.diff
Last active September 24, 2015 19:38
Changes needed in order to implement Compass back to Yeoman's generator-webapp.
-sass: {
- files: ['<%= config.app %>/styles/{,*/}*.{scss,sass}'],
- tasks: ['sass:server', 'autoprefixer']
-}
+compass: {
+ files: ['<%= config.app %>/styles/{,*/}*.{scss,sass}'],
+ tasks: ['compass:server', 'autoprefixer']
+}
...
@dimsemenov
dimsemenov / vcl-regex-cheat-sheet
Last active March 12, 2022 19:01
Regular expression cheat sheet for Varnish (.vcl). Examples of vcl regexp. Found here http://kly.no/varnish/regex.txt (by Kristian Lyngstøl)
Regular expression cheat sheet for Varnish
Varnish regular expressions are NOT case sensitive. Varnish uses POSIX
regular expressions, for a complete guide, see: "man 7 regex"
Basic matching:
req.url ~ "searchterm"
True if req.url contains "searchterm" anywhere.
req.url == "searchterm"
@ndeet
ndeet / MYTHEME.info
Last active February 8, 2018 14:41
Drupal 7, Panels 3.3+ Pane Style Plugin
; Register Style Plugin directory
plugins[panels][styles] = panels/styles
@jbmoelker
jbmoelker / grunt-prompt-builder.js
Last active January 3, 2016 00:39
The Grunt Task Wizard prompts user all available grunt tasks, and asks the user for optional arguments to run the task with. When prompt closes `task-wizard:run-task` is executed, which runs the selected task with the given arguments.This way users don't need to know tasks by heart, just type: `grunt task-wizard` to get started. To make it even …
var grunt = require('grunt');
/**
* Prompt, utility to configure and run grunt-prompt.
* @see https://github.com/dylang/grunt-prompt
*
* @example
* var prompt = require('prompt');
* prompt('create-component')
* .addQuestion({
@bingomanatee
bingomanatee / leapToUnity.js
Last active December 27, 2015 12:29
talking between Leap.js and Unity Web
(function (window) {
var controller = window.controller = new Leap.Controller();
console.log('controller made', controller);
controller.on('error', function (err) {
console.log('leap error: ', err);
})
controller.on('connect', function () {
console.log('connection made');
});
var errr = false;
@bingomanatee
bingomanatee / LeapManager.cs
Created November 5, 2013 20:29
the LeapManaager class
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class LeapManagerWeb : MonoBehaviour
{
public GameObject cursor;
private static LeapManagerWeb manager;
private static LightedPodium lockedPodium = null;
public GameObject ceilingLight, fillLight, topLight;
@justincarroll
justincarroll / bootstrap-navbar-css-reset.css
Last active March 2, 2018 15:25
This is a CSS reset for the Bootstrap Navbar component. In the future I'd like to see them deploy an .unstyled class. Until then this'll do.
.navbar-inner,
.navbar-fixed-top .navbar-inner,
.navbar-fixed-bottom .navbar-inner,
.navbar-static-top .navbar-inner {
background: none;
border: none;
-webkit-border-radius: 0;
border-radius: 0;
-moz-box-shadow: none;
-webkit-box-shadow: none;
@brandonb927
brandonb927 / example.less
Last active December 15, 2017 20:02 — forked from ddemaree/_retina.scss
Retina font-weight for thin fonts in HiDPI typography
@import "retina.less";
.body-text {
.retina-font-weight();
}
@ddemaree
ddemaree / _retina.scss
Created April 26, 2013 20:49
Example Sass mixin for a "bulletproof" Hi-DPI media query
@mixin retina($ratio: 1.5) {
$dpi: $ratio * 96;
$opera-ratio: $ratio * 100;
@media only screen and (-webkit-min-device-pixel-ratio: #{$ratio}),
only screen and ( -o-min-device-pixel-ratio: '#{$opera-ratio}/100'),
only screen and ( min-resolution: #{$dpi}dpi),
only screen and ( min-resolution: #{$ratio}dppx) {
@content;
}
@JISyed
JISyed / MoveCamera.cs
Last active November 29, 2022 11:24
Camera movement script in Unity3D. Supports rotating, panning, and zooming. Attach to the main camera. Tutorial explaining code: http://jibransyed.wordpress.com/2013/02/22/rotating-panning-and-zooming-a-camera-in-unity/
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement
// for using the mouse displacement for calculating the amount of camera movement and panning code.
using UnityEngine;
using System.Collections;
public class MoveCamera : MonoBehaviour
{
//
// VARIABLES