Skip to content

Instantly share code, notes, and snippets.

Jure Cuhalev gandalfar

Block or report user

Report or block gandalfar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
BigWhale / tailwind-config.js
Last active Jun 27, 2019
Tailwind more pseudo classes and variants
View tailwind-config.js
variants: {
margin: ['responsive', 'last-child', 'first-child', 'odd-child', 'even-child'],
plugins: [
function({ addVariant, e }) {
addVariant('first-child', ({ modifySelectors, separator }) => {
modifySelectors(({ className }) => {
return `.${e(`first-child${separator}${className}`)}:first-child`
westonruter / shutdown-handler.php
Last active Mar 22, 2019
Disable WSOD detection on WordPress 5.1 so that fatal errors during development don't constantly cause plugins to suspend
View shutdown-handler.php
<?php // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
* Plugin Name: Non-Handling Shutdown Handler
* Description: Disable WSOD protection so that plugins will not auto-suspend during development while errors often occur.
* Plugin URI:
* Plugin Author: Weston Ruter
dehuszar / detokenize
Created Nov 8, 2016
Use to extract extra values from your token
View detokenize
/* Usage
* {{detokenize 'extraValue'}} */
import Ember from 'ember';
const { get, inject } = Ember;
export default Ember.Helper.extend({
session: inject.service(),
compute(params) {
BrianSipple /
Last active Apr 17, 2017
Ember Addon Essentials -- A checklist of some of the finer details to keep in mind when developing Ember addons

Ember Addon Essentials

This document is meant to be a brief "checklist" of things to setup for your Ember addon when beginning development in order to have the best possible architecture and workflow out of the gate. For more comprehensive material, the following are bookshelf-caliber:

Filling out package.json

import traceback
import re
def debug_var(a):
s = traceback.extract_stack(limit=2)[0][3]
g = re.match("\w+\((\w+)\)", s)
print("%s = %r" % (, a))
def main():
AndrewChamp / docx_editor.php
Created Jul 27, 2015
Edit a Microsoft Word .docx file using PHP and the zip extension.
View docx_editor.php
* Edit a Word 2007 and newer .docx file.
* Utilizes the zip extension
* to access the document.xml file that holds the markup language for
* contents and formatting of a Word document.
* In this example we're replacing some token strings. Using
* the Office Open XML standard ( )
* you can add, modify, or remove content or structure of the document.
maxogden /
Last active Nov 13, 2018
list of interdisciplinary open source conferences

Interdisciplinary Open Source Community Conferences


  • Must be an event that someone involved in open source would be interested in attending
  • Must be a community oriented event (no corporate owned for-profit events here please)
  • Can't be about a specific language/framework.

Leave suggestions in the comments below

rafibomb / 2-column-stacking
Created Nov 15, 2014
2 Column Stacking Inline Links on Mobile - Ink Responsive HTML Email
View 2-column-stacking
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<link rel="stylesheet" href="ink.css"> <!-- For testing only -->
<link type="text/css" rel="stylesheet" href="" />
<style type="text/css">
mosne / gist:75b3ce1f0098663f2b1a
Last active Aug 17, 2018
Migrate images form a Magic Fields to ACF (inside a wordpress loop)
View gist:75b3ce1f0098663f2b1a
$photo_name = get_field("cover");
if ($photo_name != "") {
$ff = '/Users/mosne/Sites/Dropbox/mosne.local/wp-content/files_mf/' . $photo_name;
$handle = fopen($ff, "r");
$ffcontents = fread($handle, filesize($ff));
$attachment = wp_upload_bits($photo_name, null, $ffcontents);
acka47 / serendipity-only-orgs
Created Feb 12, 2014
orgs described in serendipity map data that aren't part of OCW consortium
View serendipity-only-orgs
"consortiumURL" : "",
"ocwURL" : "Flamenco?q=UniversityName:33&group=UniversityName",
"universityContinent" : "North America",
"universityLogo" : "",
"universityOCWURL" : "",
"universityURL" : "",
"universityCountry" : "Mexico",
"universityURI" : "",
"universityLong" : "-99.267674",
You can’t perform that action at this time.