Skip to content

Instantly share code, notes, and snippets.

Write a routine that presents a random list of candidates in preferred order based on skills, communication and experience
with experience being half as important than the other two attributes.
* Do not use the built-in sort function
* Use the task1.php template provided
* You will be judged on coding style and also the algorithm that you use
#!/usr/bin/php
<?php
@ltfschoen
ltfschoen / clean-docker-for-mac.sh
Created June 1, 2017 22:20 — forked from MrTrustor/clean-docker-for-mac.sh
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# 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 copies or
@ltfschoen
ltfschoen / ballot.sol
Created June 4, 2017 22:25
ethereum_mist_ballot_contract_default
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@ltfschoen
ltfschoen / rvm2rbenv.txt
Last active August 8, 2017 13:36 — forked from brentertz/rvm2rbenv.txt
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
sudo rm -rf /Users/<your_username>/.rvm/
# Remove RVM from ~/.bash_profile and ~/.bash_rc
# Ensure your homebrew is working properly and up to date
brew doctor
@ltfschoen
ltfschoen / codewars.rb
Last active August 22, 2017 23:01
codewars solutions
def get_middle(s)
len = s.length
if len == 1
return s
elsif len.even?
return s[(len/2)-1] + s[(len/2)]
else
return s[len/2]
end
end
@ltfschoen
ltfschoen / kali_linux_setup.md
Last active September 5, 2017 23:14
Kali Linux Setup
  • Read about Kali Linux
  • Download Kali Linux 64 bit VM for Mac
  • Extract the downloaded compressed .7z file by double clicking it into a directory
  • Create a Virtual Machine (VM) and follow these instructions to load the .vmdk file from that directory
  • Start the VM and login with Username: root, and Password: toor
  • Identify the "Host Key" (i.e. Left CMD) for mouse and keyboard capture from the host machine (your Mac)
    • Note: If the screensaver appears then drag across the screen to exit the screensaver
  • Other aspects to install
    • Installing VirtualBox Guest Additions in Kali Linux to allow you to share folders between the virtual machine Kali Linux and the host machine (your Mac)
  • [Setup networking and databases (PostgreSQL) with Metasploit](https://docs.kali.org/gene
@ltfschoen
ltfschoen / git-flow.sh
Last active September 9, 2017 01:57
Git-Flow Workflow
* Install Git-Flow
```
brew install git-flow
```
* Git-Flow Help
```
git-flow help
usage: git flow <subcommand>
@ltfschoen
ltfschoen / coder_academy_software_development_core_concepts_resources_exercises.md
Last active October 18, 2017 09:01
Coder Academy - Software Development Core Concepts, Resources, and Exercises

Guidelines

  • Questions and Answers should be generic high-level concepts without details
  • Questions and Answers must be concise and not longer than 100 characters
  • Maximum of 2 resources

Legend:

  • Abbreviations
    • Q: Questions
    • A: Answers
  • R: Resources
@ltfschoen
ltfschoen / pr.md
Created October 21, 2017 09:57 — forked from houjunchen/pr.md
Checkout Bitbucket Server pull requests locally

Locate the section for your Bitbucket Server remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@<your repo url>

Now add the line fetch = +refs/pull-requests/*/from:refs/remotes/origin/pull-requests/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@ltfschoen
ltfschoen / algorithm_summary.md
Created October 23, 2017 21:04
Algorithm Summary
  • About Algorithms

  • Heaps

    • About - is a container satisfying the Heap Property
      • Example - Refer to lib/containers/heap.rb
      • Heap class's method complexities
        • Time Complexity: O(1) - push (insert new tree with single node, has_key?, next (of value), next_key, clear, empty?, merge (link two heaps), pop