Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ashley Connor ashleyconnor

🏠
Working from home
View GitHub Profile
View gist:9d2f0ff16b9e7423eddef927af6a2264
> echo.py
print("Hello World")
> echo.php
<?php
$command = escapeshellcmd('python echo.py');
$output = shell_exec($command);
echo $output;
View gist:ebc86c2c21211ceb5763c2bff97ebce6
$ docker run --name my-redis -d redis
$ docker run -it --pid=container:my-redis \
--net=container:my-redis \
--cap-add sys_admin \
alpine sh
@ashleyconnor
ashleyconnor / System Design.md
Created Mar 10, 2020 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
View keybase.md

Keybase proof

I hereby claim:

  • I am ashleyconnor on github.
  • I am ashconnor (https://keybase.io/ashconnor) on keybase.
  • I have a public key ASD_f06OtcA0GbPamZGOKcYm7ivKmUtjDfCjNDXajpUO-go

To claim this, I am signing this object:

View processify.py
import os
import sys
import traceback
from functools import wraps
from multiprocessing import Process, Queue
def processify(func):
'''Decorator to run a function as a process.
Be sure that every argument and the return value
@ashleyconnor
ashleyconnor / how-to-set-up-stress-free-ssl-on-os-x.md
Created Jun 28, 2017 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@ashleyconnor
ashleyconnor / ngrxintro.md
Created Mar 26, 2017 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series
View ngrxintro.md

#Comprehensive Introduction to @ngrx/store By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

View error.js
// deps
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.2",
"react-router": "next",
"react-router-redux": "next",
"redux": "^3.6.0",
"redux-logger": "^2.8.1"
// index.js
@ashleyconnor
ashleyconnor / react-router-component.js
Created Jan 5, 2017
Testing component that uses react-router props
View react-router-component.js
/// Route
import React from 'react';
import { Router, Route } from 'react-router';
import Profile from './components/Profile';
const Routes = (props) => (
<Router {...props}>
<Route path="/profile/:username" component={Profile} />
View 0-startup-overview.md
You can’t perform that action at this time.