Skip to content

Instantly share code, notes, and snippets.

@loren138
loren138 / Readme.md
Last active July 6, 2016 16:53
Angular Grep (find value using array of objects with id or other property)

Angular Grep

Find value using array of objects with id or other property.

Usage

In the controller:

@loren138
loren138 / .bash_prompt_colors
Last active March 6, 2017 18:16
Server Setup - Change Password and Copy Keys/Bashrc Files
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
@loren138
loren138 / guzzle-retry.php
Last active August 16, 2016 13:26 — forked from gunnarlium/guzzle-retry.php
Example of how to create a retry subscriber for Guzzle 6
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Request as Psr7Request;
use GuzzleHttp\Psr7\Response as Psr7Response;
use Psr\Log\LoggerInterface;
const MAX_RETRIES = 2;
@loren138
loren138 / hangman.py
Last active July 13, 2017 19:39
Hangman Psuedocode
from __future__ import print_function
import numpy
# Save this file using file save in your browser
# Do not copy paste into PyCharm as it will mess up the indentation
# and thus your code will not run properly.
# Print Hangman's current state
def printHangman(numberWrong):
# Print the hangman
@loren138
loren138 / example.py
Last active July 17, 2017 15:13
Example Python
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt #conda install matplotlib
# -40 65.33333333
# -30 99.66666667
# -20 130
# -10 175.3333333
# 0 383.6666667
# 10 446.3333333