Skip to content

Instantly share code, notes, and snippets.

View wuworkshop's full-sized avatar
(╯°□°)╯︵ ┻━┻

wuworkshop wuworkshop

(╯°□°)╯︵ ┻━┻
View GitHub Profile
@rafibomb
rafibomb / desktop menu partial
Created May 2, 2015 04:17
Using Interchange on a mega-menu
<nav class="mega-menu">
<div class="row collapse">
<div class="medium-3 columns">
<img src="assets/img/duality.png" alt="company logo">
</div>
<div class="medium-7 columns">
<ul class="button-group even-3">
<li><a href="#" class="button" data-dropdown="living" data-options="is_hover:true; hover_timeout:500">Living Room Furniture</a></li>
<li><a href="#" class="button" data-dropdown="bedroom" data-options="is_hover:true; hover_timeout:500">Bedroom Room Furniture</a></li>
<li><a href="#" class="button" data-dropdown="storage" data-options="is_hover:true; hover_timeout:500">Storage<br>Furniture</a></li>
@andersr
andersr / intro_to_meteor_js.md
Last active November 5, 2015 21:12
Meteor Resources
@sarahmonster
sarahmonster / db_local.sql
Last active December 19, 2015 03:19
A series of files to include in your git directory in order to automate WordpPress database syncs.
USE DBNAME_LOCAL;
UPDATE wp_EXT_options SET option_value="http://LOCALURL:8888" WHERE option_name="siteurl";
UPDATE wp_EXT_options SET option_value="http://LOCALURL:8888" WHERE option_name="home";
@brigand
brigand / apis.md
Last active May 27, 2017 07:38
Useful http apis for sample projects and experiments

Reddit

An api for accessing reddit information. Supports CORS. Doesn't require auth. Great for learning new frontend frameworks.

https://www.reddit.com/dev/api/

Hacker News

@wnstn
wnstn / gulpfile.js
Created January 22, 2016 14:26
Rails, Gulp, and Browsersync together at last
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var setupWatchers = function() {
gulp.watch(['./app/views/**/*.erb',
'./app/assets/javascripts/**/*.js'], ['reload']);
gulp.watch(['./app/assets/stylesheets/**/*.scss'], ['reloadCSS'])
};
gulp.task('reload', function(){
@athyuttamre
athyuttamre / Makefile
Created January 23, 2016 21:08
Makefile for Meteor
.PHONY: dev dev-all dev-build dev-build-all prod prod-all prod-build prod-build-all
# Dev
# Runs the built image with dev settings.
dev:
@export METEOR_SETTINGS='$(shell cat ./app/settings.json)'; \
docker-compose up --no-deps -d app
# Runs all built services.
@brianarn
brianarn / maths.js
Last active July 6, 2020 22:08
Module to wrap `console.group` around all methods
// A simple object with some methods,
// which throw errors when bad arguments are passed.
var maths = {
square : function (value) {
// Validity checking
if (arguments.length !== 1) {
throw new Error('square: Requires one and only one argument');
}
if (typeof value !== 'number') {
throw new Error('square: Requires numeric argument');
@taranda
taranda / dynamic-critical-path-css.md
Last active July 7, 2021 19:53
Dynamically Add Critical CSS to Your Rails App

Dynamically Add Critical CSS to Your Rails App

Optimizing the delivery of CSS is one way to improve user experience, load speed and SEO of your web app. This involves determining the "critical path CSS" and embeding it into the html of your page. The rest of the CSS for the site is loaded asynchronously so it does not block the rendering of your "above the fold" content. This Gist will show you how to dynamically generate critical path CSS for your Rails app.

In this example we will use the mudbugmedia/critical-path-css gem.

Prerequisites

You will need to set up caching and Active Job in your Rails app. I recommend using a thread-safe background job manager like resque.

@karanlyons
karanlyons / ZoomDaemon.yara
Last active July 12, 2021 14:07
Fixes for Zoom, RingCentral, Zhumu (and additional white labels) RCE vulnerabilities
private rule Macho
{
meta:
description = "private rule to match Mach-O binaries (copied from Apple's XProtect)"
condition:
uint32(0) == 0xfeedface or uint32(0) == 0xcefaedfe or uint32(0) == 0xfeedfacf or uint32(0) == 0xcffaedfe or uint32(0) == 0xcafebabe or uint32(0) == 0xbebafeca
}
rule ZoomDaemon
{
@amboutwe
amboutwe / yoast_seo_title_remove.php
Last active February 17, 2022 14:57
Yoast SEO title snippets
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast SEO Title From All Pages
* Credit: Yoast Team
* Last Tested: Jun 17 2020 using Yoast SEO 14.3 on WordPress 5.4.2
*/
add_filter( 'wpseo_title', '__return_false' );