This file contains hidden or 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 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) |
This file contains hidden or 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
| <!-- 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> |
This file contains hidden or 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
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
This file contains hidden or 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
| 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); |
This file contains hidden or 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
| 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); |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <head> | |
| <link href='https://fonts.googleapis.com/css?family=Poller+One' rel='stylesheet' type='text/css'> | |
| <style> | |
| div { | |
| height: 150px; | |
| width: 300px; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Bruteforce!</title> | |
| </head> | |
| <body> | |
| <script> | |
| var password = '89p8zk', | |
| passwordLength = 4, |
This file contains hidden or 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
| <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> |
This file contains hidden or 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
| = 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 |
This file contains hidden or 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 | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
NewerOlder