Skip to content

Instantly share code, notes, and snippets.

View paulhhowells's full-sized avatar

Paul H Howells paulhhowells

  • Shepperton, U.K.
View GitHub Profile
@philandstuff
philandstuff / lead-dev-2018.org
Last active August 23, 2018 08:56
Lead Developer London 2018

Lead dev 2018

Welcome - Meri Williams

  • @TheLeadDev #LeadDevLondon
  • white coat captioning - @whitecoatcapxg
    • wvnts.co/lduk2018

The Container Operator’s Manual - Alice Goldfuss

  • happy pride! it’s like the world cup for people with fashion sense
  • who am I?
@timReynolds
timReynolds / example.js
Created June 17, 2017 12:04
Segment.com with next.js
<Head>
<script dangerouslySetInnerHTML={{ __html: `
var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="4.0.0";
@jonschlinkert
jonschlinkert / open-iterm-from-finder.md
Last active May 24, 2022 01:33
Add an icon to your finder toolbar to open iTerm in the current folder.

Open iTerm from finder

The code and instructions in this gist are from http://peterdowns.com/posts/open-iterm-finder-service.html. I've had to do this a few times and wanted to distill it the basics.

  1. Open Automator
  2. Create an Application
  3. Choose Actions > Utilities > Run Applescript
  4. Paste the contents of open_in_iterm.app into the window.
  5. Save the script somewhere convenient
  6. Find the script, then drag the script onto the Finder window while holding the command key (or in Yosemite, the command + option keys)
@lalkmim
lalkmim / codility_solutions.txt
Last active April 25, 2024 21:47
Codility Solutions in JavaScript
Lesson 1 - Iterations
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/
Lesson 2 - Arrays
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/
Lesson 3 - Time Complexity
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/
alias ll="ls -al"
unalias ll
inside ~/.bash_profile:
# -------
# Aliases
# -------
alias clr="clear" # Clear your terminal screen
alias flush="sudo discoveryutil udnsflushcaches" # Flush DNS (Yosemite)
@yanniboi
yanniboi / d8_reset.sh
Created October 3, 2014 14:18
Reinstall a clean drupal 8 site
#!/bin/sh
# Removes an existing Drupal 8 install, then install again.
# Requires Drush 7 - https://github.com/drush-ops/drush
#
# Run this script from the docroot of a Drupal 8 checkout.
# Installs to mysql://localhost/drupal, user 1 user/pass is admin/admin.
if [ ! -e ./core/core.services.yml ]
then

What is dgeni?

dgeni is a documentation generator developed by the Angular team. Ironically it lacks documentation right now, so we try to develop a very simple step-by-step-guide here, until a better documentation is available. Please share and fork this Gist.

dgeni is currently used in these project

Why should I use dgeni?

@shiffman
shiffman / ProcessingLive.md
Last active December 20, 2015 13:38
Signup for "Processing Live" test broadcast.

Last week I tested broadcasting live from my office and answering questions about Processing via google hangout. You can watch an archive of the broadcast. There are also beginner and advanced video lessons that I'm making with this system.

While I haven't sorted out the exact technology I'll use, I'm planning on making this a regular weekly live broadcast starting this fall. To be ready, I'd like to do one more test next Wednesday, August 7th at 3 PM EST (7 PM UTC).

I'd like to get four programming questions (1 hour show, 15 minutes each) signed up in advance. I'll then invite you to the hangout around 2:45 and we'll begin broadcasting at 3. If you'd like to participate, please write a question below with a link to any additional info (sketches, videos, git repos, etc.) I'm not sure exactly what I'm looking for, but I'm hoping to learn about what works best through

<?php
/**
* @file
* Default theme implementation to display the basic html structure of a single
* Drupal page.
*
* Variables:
* - $css: An array of CSS files for the current page.
* - $language: (object) The language the site is being displayed in.
@paulhhowells
paulhhowells / metamorphosis pattern .js
Last active December 16, 2015 12:39
Douglas Crockford’s Module pattern, but it starts (and finishes) as an object rather than a function. A publicly accessible object metamorphoses into an object with public methods and variables, and private methods and variables.
metamorphosis = {
defaults : {
thing : 4
},
init : function (options) {
var
the = this,
o, // private object
p; // public object