Skip to content

Instantly share code, notes, and snippets.

View voodooGQ's full-sized avatar

Shane Smith voodooGQ

View GitHub Profile
@davidwhitney
davidwhitney / LICENSE.txt
Last active October 7, 2019 21:14
A Tiny Typescript mocking... um... library? class? That doesn't annoy me, and doesn't cause Typescript linters to get confused or fill your code up with :anys. The license is MIT.
Copyright (c) 2019 David Whitney
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@zironycho
zironycho / alb-ingress.yaml
Created May 19, 2019 13:32
argocd alb-ingress controller setup
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
namespace: argocd
name: argocd-ingress
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80,"HTTPS": 443}]'
alb.ingress.kubernetes.io/certificate-arn: {{ your-acm-arn }}
@iamtmrobinson
iamtmrobinson / custom-props.tsx
Created January 8, 2018 14:49
Using custom props with a Redux form in Typescript
import * as React from 'react';
import {
Field as FormField,
InjectedFormProps,
reduxForm,
} from 'redux-form';
interface CustomProps {
customText: string;
}
@nvd
nvd / Gemfile
Last active February 14, 2019 02:16
swagger s3 cf
source 'https://rubygems.org'
gem 'aws-sdk', '~> 2.3'
@perrygeo
perrygeo / base64_padding.md
Last active October 25, 2023 16:20
Avoiding TypeError: Incorrect padding with Python's base64 encoding

Avoiding padding errors with Python's base64 encoding

>>> import base64
>>> data = '{"u": "test"}'
>>> code = base64.b64encode(data)
>>> code
'eyJ1IjogInRlc3QifQ=='
@gordjw
gordjw / wordpress
Created June 4, 2015 12:21
Nginx config file to serve wordpress core and wp-content from different directories
server {
listen 443 ssl;
listen 80;
root /data/www/web/core;
server_name web;
server_name_in_redirect off;
client_max_body_size 100m;
index index.php index.html index.htm;
#!/usr/bin/env php
<?php
/**
* Composer Wrapper
*
* You may use this file as you would the standard composer command line tool.
* This script is made to wrap the composer script. It will download composer
* and place the executable phar file in the `bin/` folder of the project if
* it is not already available. When the executable phar is available this
* script will forward all commands to the composer executable.
@tmoitie
tmoitie / gist:9808555
Last active April 18, 2024 18:56
Wordpress: Gravity Forms List to ACF Repeater post save
<?php
add_action('gform_after_submission', 'gfToAcfListToRepeater', 10, 2);
function gfToAcfListToRepeater($entry, $form)
{
foreach ($form['fields'] as $field) {
if (!($field['type'] == 'post_custom_field' && $field['inputType'] == 'list' && $field['enableColumns'] == true)) {
continue;
}
$id = $field['id'];
@sumpygump
sumpygump / getting-started.md
Created February 20, 2014 05:50
symfony getting started

Symfony Standard Getting Started Guide

Requirements

You must have composer and phing installed.

Create New Project

Create a new project by running the command

<?php
/**
* File plugin.php
*
* @author Douglas Linsmeyer <douglas.linsmeyer@nerdery.com>
*/
$mapFactory = new MapFactory();