Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Schutzsmith schutzsmith

View GitHub Profile
@djrmom
djrmom / custom-hooks.php
Created Nov 16, 2018
facetwp add additional classes/id to layout template
View custom-hooks.php
<?php
/** add additional classes / id to the facetwp-template div generated by a facetwp
** layout template
**/
add_filter( 'facetwp_shortcode_html', function( $output, $atts) {
if ( $atts['template'] = 'example' ) { // replace 'example' with name of your template
/** modify replacement as needed, make sure you keep the facetwp-template class **/
$output = str_replace( 'class="facetwp-template"', 'id="masonry-container" class="facetwp-template small-up-1 medium-up-2 large-up-3"', $output );
}
return $output;
@agrcrobles
agrcrobles / android_instructions_29.md
Last active Sep 29, 2021 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio
View android_instructions_29.md

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

See for brew, python3 and NodeJS on nvm see gist https://gist.github.com/agrcrobles/3d945b165871c355b6f169c317958e3e

@afeld
afeld / civictech.md
Last active Sep 30, 2021
civic tech jobs in NYC (or remote)
View civictech.md
View _gravity-forms-bootstrap.scss
.gform_wrapper ul {
@extend .list-unstyled;
}
.gform_wrapper li {
@extend .form-group;
}
.gform_wrapper form {
margin-bottom: 0;
View learntocode.md

Learn to Code!

Summary and links

Start withs some games

  • Lightbot
  • CodeCombat
  • Checkio.org

Design a simple site with HTML and CSS

  • Noodle around with Scratchpad.io
@taeo
taeo / gravityforms-star-ratings.html
Last active Aug 27, 2021
Quick hack / jQuery plugin to enable visual star ratings from Gravity Forms radio fields.
View gravityforms-star-ratings.html
<!--
GRAVIY FORMS NOTES:
1. Create a “radio” group on any form
2. In the “appearance" tab, give the custom css class `js-gf-rating-stars`
3. The radio values should be in order from low -> high (1,2,3,4,5,etc…).
4. You can have as many stars as you want, it’s based off the number of radio elements in the group.
5. You could technically have as many groups of ratings stars as you want.
JS CONFIG:
@kud
kud / README.md
Last active Jun 9, 2021
A bookmarklet for Todoist to add a website to your read later project.
View README.md

One-click "read later" bookmarklet for Todoist

Installation

  • Copy/paste todoist-read-later-one-click.js content in a bookmark.
  • Specify your token (Settings > Todoist Settings > Account > Go to the bottom of the page)
  • Specify your project_id (no project_id means Inbox, if not, go to Task actions > Email tasks to this project, read the url of the popup https://:browser.todoist.com/Emails/view?project_id=:id, take the id there)
  • Profit!

Usage

@fta2012
fta2012 / DragTransform
Last active Jul 8, 2021
Slightly modified compiled coffeescript from this codepen: http://codepen.io/fta/pen/ifnqH. Paste into console on a page that has jQuery to load the two dependent libraries (jquery-ui and numericjs). Then call makeTransformable('#selector-name') to make that element WYSIWYG editable. Use inspector to get the CSS for the transforms.
View DragTransform
var selector = 'img' // Replace this with the selector for the element you want to make transformable
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() {
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() {
(function() {
var $, applyTransform, getTransform, makeTransformable;
$ = jQuery;
@chrisvanpatten
chrisvanpatten / readme.md
Last active Sep 18, 2020
Super-simple way to grab a few Instagram images and cache them w/ WordPress
View readme.md

This is an easy way to integrate a basic Instagram feed into a WordPress site.

Setup

First, register with Instagram's developer program, then register a client. Set the client ID they provide you in line 4.

Second, get your Instagram user ID by running this in your terminal:

curl -X GET https://api.instagram.com/v1/users/search\?q\=USERNAME\&client_id\=CLIENT_ID
@geelen
geelen / gulpfile.js
Last active Oct 11, 2017 — forked from superhighfives/gulpfile.js
Harp with BrowserSync! Woo!
View gulpfile.js
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var harp = require('harp');
/**
* Serve the Harp Site from the src directory
*/
gulp.task('serve', function () {
harp.server(__dirname + '/src', {