Skip to content

Instantly share code, notes, and snippets.

View joshangell's full-sized avatar

Josh Angell joshangell

View GitHub Profile
@jakebellacera
jakebellacera / ICS.php
Last active April 19, 2024 09:06
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@seedprod
seedprod / vt_resize.php
Created November 15, 2011 14:45
Resize WordPress images on the fly vt_resize w/ multisite support
<?php
/*
* Resize images dynamically using wp built in functions
* Victor Teixeira
*
* php 5.2+
*
* Exemplo de uso:
*
* <?php
@danielstgt
danielstgt / imagick3.4.3-PHP7.3-forge.sh
Last active May 30, 2023 22:43 — forked from rostockahoi/imagick3.4.3-PHP7.2-forge.sh
Install Imagick 3.4.3 on PHP 7.3 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.3.tgz
tar xvzf imagick-3.4.3.tgz
@samhernandez
samhernandez / haxor.twig
Last active December 2, 2022 21:40
Craft 3 gain access to admin account for support cases or when owner loses access
{#
Resets the username, password, and email address
of the first found Admin account in case of
lost admin access or for support cases.
#}
{% set values = {
username: 'me',
password: craft.app.security.hashPassword('mypassword'),
email: 'me@site.com',
passwordResetRequired: 0
@barneycarroll
barneycarroll / README.md
Last active August 29, 2022 12:02
Lock and unlock a page's scroll position.

jquery.scrollLock.js

Useful for when a blocking user experience is needed (in my case, didn't want people unwittingly loosing their place by scrolling while a modal required their attention): $.scrollLock() locks the body in place, preventing scroll until it is unlocked.

// Locks the page if it's currently unlocked
$.scrollLock();

// ...or vice versa
@kTmnh
kTmnh / ios6-timers.js
Last active April 27, 2022 21:24 — forked from ronkorving/ios6-timers.js
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is free to use by anyone (MIT, blabla).
// Original Author: rkorving@wizcorp.jp
var timeouts = {};
var intervals = {};
var orgSetTimeout = window.setTimeout;
var orgSetInterval = window.setInterval;
@ostark
ostark / EventCatcher.php
Created September 27, 2018 16:56
A wildcard event handler that logs all Yii/Craft events
class EventCatcher
{
/**
* @var array
*/
protected $classConstants = [];
public function __invoke(yii\base\Event $event)
{
@matthooks
matthooks / readme.md
Last active November 12, 2020 16:41
Stripe Elements + Typekit

See comment below: