Skip to content

Instantly share code, notes, and snippets.

View wub's full-sized avatar

Jarrod Mosen wub

View GitHub Profile
@eneko
eneko / list-of-curl-options.txt
Last active May 8, 2024 18:45
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
@jabrown85
jabrown85 / AspNetCoreSentryRequestFactory.cs
Last active April 12, 2019 13:25
A basic implementation of sentry for aspnet core using existing RavenSharp (full .NET framework required)
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Dynamic;
using System.IO;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives;
using SharpRaven.Data;
@andyshinn
andyshinn / Dockerfile
Last active August 8, 2023 08:39
Postal on Docker
FROM ruby:2.3-onbuild
VOLUME /opt/postal/config
ENV LOG_TO_STDOUT 1
ENV AM_CONFIG_ROOT /opt/postal/config
RUN gem install procodile
RUN apt-get update -qq && apt-get install -yqq nodejs
@iammerrick
iammerrick / LazilyLoad.js
Last active August 7, 2019 14:15
Lazily Load Code Declaratively in React + Webpack
import React from 'react';
const toPromise = (load) => (new Promise((resolve) => (
load(resolve)
)));
class LazilyLoad extends React.Component {
constructor() {
super(...arguments);
@ngauthier
ngauthier / restart-last-build
Created November 19, 2014 15:44
Restart last build
#!/usr/bin/env bash
# Usage: restart-last-build <project-id>
# You must set the environment variable API_KEY to your codeship API key, for example:
# $ CODESHIP_API_KEY=abc123 restart-last-build 1234
PROJECT_ID=$1
set -e
echo Restarting last build for project $PROJECT_ID
@staltz
staltz / introrx.md
Last active May 9, 2024 07:59
The introduction to Reactive Programming you've been missing
// Brightness math based on:
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx
$red-magic-number: 241;
$green-magic-number: 691;
$blue-magic-number: 68;
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number;
@function brightness($color) {
// Extract color components
@axemclion
axemclion / article.md
Last active January 4, 2016 12:19
Article for HTML5rocks.com

Automating Web Rendering Performance Measurement

Ensuring that your web pages are delivered to the user as quickly as possible, results in a great user experience. However, users spend more time interacting with the page than waiting for it to download. This makes the smoothness and responsiveness of the site even more critical. Janky page scrolls, disjointed animations or delayed visual cues in a page are just as bad as a site that takes time to load.

Most modern web browsers have tools that can help determine the various performance bottlenecks during typical user interactions. Excellent tutorials have also been written about performance workflows. Despite this, rapid development and deploy cycles make it hard to implement regular performance audits. Tools like [PageSpeed Insights](http://updates.html5rocks.com/201

@eanakashima
eanakashima / errors.js.coffee
Created December 10, 2013 19:32
client-side error beacon code in coffeescript
class YourNamespace.Errors
window.onerror = (e) => @report(e)
@report: (e) ->
img = new Image(1,1)
img.src = '//' + your_config.errors_host + '/images/error_pixel.gif'
img.style.display='none'
document.getElementsByTagName('body')[0].appendChild(img);
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',