Skip to content

Instantly share code, notes, and snippets.

View kevinmel2000's full-sized avatar
🎮
Game Dev

Teddy Zugana kevinmel2000

🎮
Game Dev
View GitHub Profile
START, END = 'A', 'E'
COORDINATE = {
'A' : [0,0],
'B' : [2,0],
'C' : [0,5],
'D' : [4,1],
'E' : [4,0]
}
EDGE = {
'A' : ['B','C','D'],
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
import random
def get_map(num1,num2):
result = []
idx = 0
try:
for x in range(num1):
for y in range(num2):
result.insert(idx,(x,y))
@kevinmel2000
kevinmel2000 / laravel-new.sh
Created March 18, 2016 03:21 — forked from mul14/laravel-new.sh
Simple script to create Laravel project and cd into target directory. Put this script in your bashrc or zshrc file.
laravel-new() {
if [ -z "$1" ]; then
cat << EOF
Please provide a directory name.
Usage:
laravel-new [directory-name]
EOF
return;
from random import choice
from string import ascii_lowercase, ascii_uppercase, digits
from tkinter import Tk, Entry, Button, StringVar
def random_string(length):
return ''.join(choice(ascii_lowercase + digits + ascii_uppercase) for i in range(length))
root = Tk()
root.title('32 chars random string generator')
@kevinmel2000
kevinmel2000 / keychain-system-dump.sh
Created July 26, 2016 13:34 — forked from masbog/keychain-system-dump.sh
Dump system keychain with automation insert username and password
$security dump-keychain -d /Library/Keychains/System.keychain > System-keychain.txt &
$osascript 2>/dev/null <<EOF
set appName to "${username}"
set appPass to "${password}"
tell application "System Events"
repeat while exists (processes where name is "SecurityAgent")
tell process "SecurityAgent"
if exists (text field 1 of window 1) then
set value of text field 1 of window 1 to appName
set value of text field 2 of window 1 to appPass
@kevinmel2000
kevinmel2000 / wisely.py
Created August 25, 2016 12:27 — forked from budanthara/wisely.py
Wisely Bit
import string
cipher = "233 129 9 5 130 194 195 39 75 229"
def decode():
flag = ""
strs = string.letters + "0123456789" + "{}_~*&^%$#@!()-"
to_list = ' '.join(strs).split(' ')
user_str = []
for char in strs:
@kevinmel2000
kevinmel2000 / piramida-asterisk.php
Created September 20, 2016 09:26 — forked from yudaprawira/piramida-asterisk.php
PHP Piramida Asterisk
<?php
$GLOBALS['n'] = 15; YP('*', $GLOBALS['n'], 'down') . YP('*', 2, 'up');
function YP($t, $c, $tipe='down') {
echo str_repeat('&nbsp;', $GLOBALS['n'] - $c) . str_repeat($t, $c) . "<br/>";
$tipe=='down' ? $c-- : $c++; if ($c>0 && $c<=$GLOBALS['n']) YP($t, $c, $tipe);
}
?>
@kevinmel2000
kevinmel2000 / riot-matrix-workshop.md
Created March 17, 2017 12:46 — forked from attacus/riot-matrix-workshop.md
Create your own encrypted chat server with Riot and Matrix

Running your own encrypted chat service with Matrix and Riot

Authors and Workshop Instructors:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

The goal of this workshop is to teach you how to configure and run your own Matrix/Riot service. By the end of the workshop, you should be able to log into secure chat rooms and invite others to the same server.

MacOS Sierra 10.12 @Lenovo G40-70

Spesifikasi G40-70

  • Processor Intel Core i3-4030U Haswell
  • Integrated graphics Intel HD 4400
  • Ethernet Realtek RTL8111GU
  • Wireless Realtek RTL8723BE
  • Audio codec Conexant CX20751/2