Skip to content

Instantly share code, notes, and snippets.

View revcozmo's full-sized avatar
💭
Traveling in Hyperspace

The Reverend Cozmo revcozmo

💭
Traveling in Hyperspace
View GitHub Profile
@revcozmo
revcozmo / fblogin.py
Created September 4, 2018 16:18 — forked from chm0815/fblogin.py
Facebook Login Script
import sys, urllib, urllib2, cookielib
class FacebookLogin(object):
def __init__(self,user,passw):
self.user=user
self.passw=passw
self.browser = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookielib.CookieJar()))
self.browser.addheaders=[('User-agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0')]
urllib2.install_opener(self.browser)
@revcozmo
revcozmo / html-canvas-file-upload-local-storage.html
Created August 18, 2018 05:29 — forked from steveosoule/html-canvas-file-upload-local-storage.html
JavaScript Image Upload, Canvas, and Local Storage Example
<!-- http://tech.pro/tutorial/1383/javascript-one-language-to-rule-them-all -->
<style>
[for=blue] { color: blue; }
[for=green] { color: green; }
[for=red] { color: red; }
</style>
<input id="uploadImage" type="file" name="photo" />
<input id="caption" type="text" name="caption" placeholder="caption" />
<label for="blue">Blue</label>
@revcozmo
revcozmo / nodejs-cheatsheet.js
Created July 29, 2018 14:57 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@revcozmo
revcozmo / app.js
Created June 25, 2018 02:03 — forked from tristen/app.js
Zoom Slider
var zoomSlider = document.getElementById('zoom');
var zoomValue = document.getElementById('zoomvalue');
var map, targetZoom;
var initMap = function() {
var template = 'http://{S}tile.openstreetmap.org/{Z}/{X}/{Y}.png';
var subdomains = ['', 'a.', 'b.', 'c.'];
var provider = new MM.TemplatedLayer(template, subdomains);
map = new MM.Map('map', provider, null);
@revcozmo
revcozmo / rock, paper, scissors in js
Created April 30, 2018 14:53
Rock, Paper, Scissors JavaScript game
var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
} console.log("Computer: " + computerChoice);
@revcozmo
revcozmo / bot.html
Created March 24, 2018 20:12 — forked from off-by-some/bot.html
Drawing a robot in CSS
<!DOCTYPE html>
<head>
<link href='https://fonts.googleapis.com/css?family=Poller+One' rel='stylesheet' type='text/css'>
<style>
div {
height: 150px;
width: 300px;
@revcozmo
revcozmo / bruteforce.html
Created February 4, 2018 00:19 — forked from najlepsiwebdesigner/bruteforce.html
Javascript bruteforce password attack
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bruteforce!</title>
</head>
<body>
<script>
var password = '89p8zk',
passwordLength = 4,
@revcozmo
revcozmo / identicon.html
Created November 10, 2017 16:52 — forked from richardkundl/identicon.html
Github style identicon generator
<html>
<head>
<title>Github style identicon generator </title>
<style>
body { background: #333 }
canvas { margin: 1em }
</style>
<script src="http://www.myersdaily.org/joseph/javascript/md5.js"></script>
</head>
<body>
@revcozmo
revcozmo / README
Created August 20, 2017 01:54 — forked from ebababi/README
PINGPONG TEST: A small ping pong front end app in HTML5
= PINGPONG TEST
Can you make a small ping pong front end app with HTML5? Basically it has 2
square wall and can kick the ball the each other, don't think it to be very
complicated, you should be able to finish this within 3 hours. Just want to see
a ball can be kicked from left to right and from right to left, and the ball
can be a square as well.
== Citations
@revcozmo
revcozmo / bash-cheatsheet.sh
Created August 5, 2017 03:34 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04