Skip to content

Instantly share code, notes, and snippets.

Avatar
💣

Mike Lynch nycynik

💣
View GitHub Profile
@nycynik
nycynik / softwareengineeringexcel.md
Created Apr 30, 2019 — forked from arttuladhar/softwareengineeringexcel.md
Software Engineering Competency Checklist
View softwareengineeringexcel.md

Software Engineering Excellency

DATA STRUCTURES
  • Doesn’t know the difference between Array and LinkedList
  • Able to explain and use Arrays, LinkedLists, Dictionaries etc in practical programming tasks
  • Knows space and time tradeoffs of the basic data structures, Arrays vs LinkedLists, Able to explain how hashtables can be implemented and can handle collisions, Priority queues and ways to implement them etc.
  • Knowledge of advanced data structures like B-trees, binomial and fibonacci heaps, AVL/Red Black trees, Splay Trees, Skip Lists, tries etc
ALGORITHMS
  • Unable to find the average of numbers in an array
@nycynik
nycynik / wp_add_admin.sql
Created May 4, 2017
SQL to add a admin user to a wordpress site.
View wp_add_admin.sql
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'Your Name', 'test@yourdomain.com', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10');
View python2.2.12.dockerfile
FROM python:2.7.12
# runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends gawk \
&& rm -rf /var/lib/apt/lists/*
@nycynik
nycynik / application.py
Created Nov 28, 2016 — forked from mjul/application.py
Configure a Python Flask application to use the associated Amazon RDS Postgres (or MySQL) database when running on Elastic Beanstalk (inside Docker).
View application.py
driver = 'mysql+pymysql://'
driver = 'postgresql+psycopg2://'
app.config['SQLALCHEMY_DATABASE_URI'] = driver \
+ os.environ['RDS_USERNAME'] + ':' + os.environ['RDS_PASSWORD'] \
+'@' + os.environ['RDS_HOSTNAME'] + ':' + os.environ['RDS_PORT'] \
+ '/' + os.environ['RDS_DB_NAME']
View docreqs.py
import sys
try:
import xmlrpclib # Python 2
except ImportError:
import xmlrpc.client as xmlrpclib # Python 3
#
# Python script to create a document of your requirements for a
# python project. Prints the home page of each project
@nycynik
nycynik / InstallOracleMac
Last active Feb 29, 2016
A (destructive) method of installing oracle on a mac. This installs oracle to /opt/oracle/instantclient, and destroys any existing /opt/oracle/instantclient* folders. It also sets up the enviornment to use the newly installed oracle, however it does not set your .bash_profile up for the next time you need it. This script needs to be run from the…
View InstallOracleMac
OLD_PWD=$(pwd)
echo "Installing Oracle.."
sudo rm -rf /opt/oracle/instantclient*
sudo mkdir -p /opt/oracle
sudo unzip instantclient-\*.zip -d /opt/oracle/
cd /opt/oracle
for FILE in /opt/oracle/instant*; do
View Mac Os Init from brightwing
#!/usr/bin/env bash
# This script is idempotent
# TODO: Add VERRBOSE to silence commands (default to no output)
# TODO: Add log file
# TODO: Convert >/dev/null to &>-
# TODO: Don't use cask for chrome since it screws up 1Password permission
# Before running script:
# * Create/login to the user you want to run it from
View djangoeb.js
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Template: This template installs a single-instance with dev environment for elastic beanstalk as well as Jenkins server. This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"EC2Tag" : {
"Description" : "EC2 tag name",
"Type" : "String"
},
View Create iOS Icons.jsx
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com