Skip to content

Instantly share code, notes, and snippets.

@JaosnHsieh
JaosnHsieh / facebook-login.sh
Created April 19, 2018 09:37 — forked from rajapaju/facebook-login.sh
Login to Facebook using cURL
#!/bin/bash
# If it redirects to http://www.facebook.com/login.php at the end, wait a few minutes and try again
EMAIL='YOUR_EMAIL' # edit this
PASS='YOUR_PASSWORD' # edit this
COOKIES='cookies.txt'
USER_AGENT='Firefox/3.5'
@JaosnHsieh
JaosnHsieh / facebook-login.sh
Created April 12, 2018 10:43 — forked from hubgit/facebook-login.sh
Login to Facebook using cURL
#!/bin/bash
# If it redirects to http://www.facebook.com/login.php at the end, wait a few minutes and try again
EMAIL='YOUR_EMAIL' # edit this
PASS='YOUR_PASSWORD' # edit this
COOKIES='cookies.txt'
USER_AGENT='Firefox/3.5'
@JaosnHsieh
JaosnHsieh / index.html
Created July 17, 2017 10:38 — forked from anonymous/index.html
Slot Machine
<html>
<head>
<link href="style.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Asset" rel="stylesheet">
</head>
<body>
<div id = "space">
<div id="container1">
<div class="div1"><img src="https://247wallst.files.wordpress.com/2015/05/thinkstockphotos-158403411.jpg?w=200"></div>
<div class="div2"><img src="http://2.wlimg.com/product_images/bc-small/dir_115/3420934/fresh-orange-1671496.jpg"></div>
@JaosnHsieh
JaosnHsieh / localStorage.html
Created October 21, 2016 06:02 — forked from sagar-ganatra/localStorage.html
Local storage event listeners
<!DOCTYPE html>
<html>
<head>
<title>localStorage Test</title>
<script type="text/javascript" >
var count = 0;
var storageHandler = function () {
alert('storage event 1');
};
@JaosnHsieh
JaosnHsieh / Rounding
Created July 11, 2016 13:03
ES6 and older version
//es6
const fixMe = (num, fix) => Math.round(num * 10 ** fix) / (10 ** fix)
fixMe(48.48-66.11111111, 2)
//older version
var fixme=function(num, fix) {
var answer = Math.round(num*Math.pow(10, fix))/(Math.pow(10, fix));
console.log(answer);
};
fixme(1/3, 8); //=>0.33333333 (8 decimal places)