Skip to content

Instantly share code, notes, and snippets.

View ryanzebian's full-sized avatar

Ryan Z ryanzebian

View GitHub Profile
@ryanzebian
ryanzebian / mastermind.py
Last active February 26, 2021 02:24
MasterMind Game
from random import randint
COLORS = ["🔴","🔵","🟢","🟡","⚪","⚫"]
COLORS_WORDS = ["r","b","g","y","w","x"]
RED_SQUARE = "🟥 "
WHITE_SPACE = "⬜ "
WHITE_SQUARE = "🟪 "
MAX_SPOTS = 4
def check_row(row,answer):
correct_cnt = correct_color = 0
@ryanzebian
ryanzebian / keybase.md
Created February 20, 2021 18:43
keybase proof

Keybase proof

I hereby claim:

  • I am ryanzebian on github.
  • I am ryanzebian (https://keybase.io/ryanzebian) on keybase.
  • I have a public key ASD8xWWBk2EnKlC1unNCh6Fivv1oA7pLbHTZDDETRTCxogo

To claim this, I am signing this object:

@ryanzebian
ryanzebian / boxstarter.ps1
Created September 24, 2019 05:22
Boxstarter Script
# Description: Boxstarter Script
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
# OR
#! /usr/bin/env python
:map <cr> :w\|:!./%<cr>
@ryanzebian
ryanzebian / telnet-rfc-5322-email.sh
Created September 6, 2018 17:24
Send a RFC 5322 compliant email using telnet
#based on https://gist.github.com/floudet/75f3e089fd400c06abfc491b8098d158
$ telnet mail.example.org 25
Trying XXX.XXX.XXX.XXX...
Connected to XXX.XXX.XXX.XXX.
Escape character is '^]'.
220 *********************************
EHLO server.example.org
250-mail.example.com
250-PIPELINING
250-SIZE 20480000
@ryanzebian
ryanzebian / main.dart
Created August 23, 2018 01:29
Decode JSON
import 'dart:convert';
void main() {
var x = "[ 5, \n 10, \n15\n, 20]";
var b = jsonDecode(x);
print(b[3]); //prints 20
}
@ryanzebian
ryanzebian / boxstarter.ps1
Created June 10, 2018 19:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Ryan Zebian
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
#!/bin/bash
if [ $1 = "rm" ]; then
echo "removing swarm and vms"
docker-machine rm manager1 worker1 worker2 -f
docker-machine ls
exit
fi
#creating vms
echo "##Creating VMs##"
docker-machine create --driver virtualbox manager1
@ryanzebian
ryanzebian / boxstarter.ps1
Created May 20, 2018 09:15 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGIiNYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKYHCBMXGB9VJG51bGzVCQoLDA0ODxARElxOU0NvbXBvbmVudHNVTlNSR0JcTlND
b2xvclNwYWNlXxASTlNDdXN0b21Db2xvclNwYWNlViRjbGFzc08QKDAuMDI3NDUxMDA2
NyAwLjIxMTc2NDcyMzEgMC4yNTg4MjM0ODQyIDFPECYwLjAzOTM4MDc1MTU1IDAuMTYw