This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
red=$'\e[1;31m' | |
green=$'\e[1;32m' | |
yellow=$'\e[1;33m' | |
blue=$'\e[1;34m' | |
magenta=$'\e[1;35m' | |
cyan=$'\e[1;36m' | |
dim=$'\e[2m' | |
end=$'\e[0m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
angular.module('app') | |
.filter('fuzzyFilter', FuzzyFilter); | |
/** | |
* Flattens an array<any> into an array of elements | |
* where the elements contain only literals (i.e. Strings, Numbers, Booleans) | |
* @param {Array<any>} arr an iterable to flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Built from https://github.com/zhiyelee/node-leetcode | |
/** | |
* Converts an array into a Linked List | |
* @param {Array<Number>} arr the array to convert | |
* @return {Object} the linked list object | |
*/ | |
var createList = arr => { | |
var head = { val: null, next: null }; | |
var current = head; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from passlib.hash import sha256_crypt | |
# Create Encrypted Password | |
hash = sha256_crypt.encrypt("super_secret_password") | |
# Verify Encrypted Password | |
sha256_crypt.verify("super_secret_password", hash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom Dom Ready Function Script | |
function f() { | |
// Do Something | |
} | |
function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()} | |
// Credit: http://www.dustindiaz.com/smallest-domready-ever |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Generate_PrimeTable { | |
public static void main(String args[]) { | |
int erato_complex = 50000; | |
ArrayList<Integer> erato_primes = eratosthenes_Sieve(erato_complex); | |
System.out.println("Eratosthenes Sieve:"); | |
System.out.println("Complexity: " + erato_complex); | |
System.out.println("# of Primes in Prime Chart: " + erato_primes.size()); | |
System.out.println("Largest Prime: " + erato_primes.get(erato_primes.size() - 1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
import java.util.ArrayList; | |
import java.util.StringTokenizer; | |
import java.math.BigInteger; | |
class RSA { | |
private int[] public_Key = new int[2]; | |
private int[] privat_Key = new int[2]; | |
public static void main(String[] args) { |