Skip to content

Instantly share code, notes, and snippets.

@max-mapper
max-mapper / readme.md
Last active May 14, 2022 09:12
list of interdisciplinary open source conferences

Interdisciplinary Open Source Community Conferences

Criteria

  • 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

@AndrewChamp
AndrewChamp / docx_editor.php
Created July 27, 2015 15:05
Edit a Microsoft Word .docx file using PHP and the zip extension.
<?php
/**
* Edit a Word 2007 and newer .docx file.
* Utilizes the zip extension http://php.net/manual/en/book.zip.php
* 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 ( https://en.wikipedia.org/wiki/Office_Open_XML )
* you can add, modify, or remove content or structure of the document.
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" % (g.group(1), a))
def main():
foo=1
@BrianSipple
BrianSipple / ember-addon-essentials.md
Last active April 17, 2017 18:27
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

@dehuszar
dehuszar / detokenize
Created November 8, 2016 15:44
Use to extract extra values from your token
/* Usage
* {{detokenize 'extraValue'}} */
import Ember from 'ember';
const { get, inject } = Ember;
export default Ember.Helper.extend({
session: inject.service(),
compute(params) {
@lukecav
lukecav / Command
Last active June 6, 2023 20:50
Delete all Action Scheduler posts using WP-CLI
wp post delete $(wp post list --post_type='scheduled-action' --format=ids)
wp post delete $(wp post list --post_status=trash --format=ids)
@westonruter
westonruter / shutdown-handler.php
Last active March 22, 2019 18:48
Disable WSOD detection on WordPress 5.1 so that fatal errors during development don't constantly cause plugins to suspend
<?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: https://gist.github.com/westonruter/583a42392a0b8684dc268b40d44eb7f1
* Plugin Author: Weston Ruter
*/
/**
@BigWhale
BigWhale / tailwind-config.js
Last active June 27, 2019 13:50
Tailwind more pseudo classes and variants
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`
})
})