Skip to content

Instantly share code, notes, and snippets.

:octocat:
💻🏠

Ahmed Eid a-eid

:octocat:
💻🏠
Block or report user

Report or block a-eid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View new_layout.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style>
* {
box-sizing: border-box;
@a-eid
a-eid / 0_reuse_code.js
Created Aug 17, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View html2.html
<!DOCTYPE html>
<html lang="en-US"><head>
<script type="text/javascript" src="http://get-a-fuckbuddy.com/en/6/script.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<title></title>
View html.html
<html class="no-js" xmlns="http://www.w3.org/1999/xhtml">
<!-- Mirrored from local-bitches.com/web/enlps/Int/rad/r2.html?voluumdata=BASE64dmlkLi4wMDAwMDAwNC00MjY5LTQzOGEtODAwMC0wMDAwMDAwMDAwMDBfX3ZwaWQuLmU4MzVmODAwLTY1MzItMTFlNi04MWFjLWZlYjJhNDE3YzZiYV9fY2FpZC4uNzI5ZWUxYzctNTk2Yy00ZTQ2LWFhODQtYTI1NjhkMTQ4YmExX19ydC4uUl9fbGlkLi4wMThiODkzNy0wODMzLTQ1ZmMtYTE2ZS1iMjhkZGExNDg4ZjVfX29pZDEuLjQ3YWJhZmI5LWFiZjctNDg1My05YzUyLTY0ZDQzNDZhZmI2Y19fdmFyMS4uT0NUMTUtMjYyX192YXIyLi57S2V5d29yZH1fX3ZhcjMuLlhoYW1zdGVyX192YXI0Li4xMDIwODMzNzQxX192YXI1Li4wXC5cMTkwX19yZC4uYWRzXC5cdHJhZmZpY2p1bmt5XC5cbmV0X19haWQuLl9fYWIuLl9fc2lkLi4&Ad=OCT15-262&Keyword={Keyword}&site=Xhamster&bidid=1020833741&bidv=0.190&aclid=fJ61VwAAAADZSRAAyeeqO4FY5UbpoAMAz0kQANlJEAD_____AAAAAA== by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 18 Aug 2016 15:12:57 GMT -->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-
View wget
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --domains website.org --no-parent "http://awhorenextdoor.com/eng/milf2c1/\?voluumdata\=BASE64dmlkLi4wMDAwMDAwMy02MDdiLTRhM2EtODAwMC0wMDAwMDAwMDAwMDBfX3ZwaWQuLmM2ZmU3ODAwLTdjNmItMTFlNy04Yjg5LWRlOGQ4NGMxZmY1NV9fY2FpZC4uZjE5N2NhNzktMDQ1OC00YjM0LWE5NGEtZWM4YjZiYjIzOTVmX19ydC4uREpfX2xpZC4uNGFmZjg2NjgtNmM2OC00YmU1LTkzOWEtNDJlZGZhNmJhYmFmX19vaWQxLi41ODQ0MzZiZC1kMzE5LTRlZDgtYTEzNS00Y2VhOWRkYzZiOWRfX3ZhcjEuLjEyMzg0MjE4NTFfX3ZhcjIuLjM4X192YXIzLi42Zjk3NjhlYTMxMTFlNjk2NjQwMDI1OTBjNTdmOTZfX3ZhcjQuLjEwMDEyODc0ODFfX3ZhcjUuLlR1YmU4X192YXI2Li5UdWJlOCBQQyAtIFZpZGVvIEFfX3ZhcjcuLkdCX192YXI4Li5sQXFLV1FBQUFBQS1BQUFBT1ctdU8xdlIwRW5RVVFBQUpnQUFBRDRBQUFEXF9cXF9cXF9cXF9cXF9cQUFBQUFBPT1fX3ZhcjEwLi5GQlxfXERcX1xWQVxfXDMwMFxfXEFfX3JkLi5fX2FpZC4uX19hYi4uX19zaWQuLl9fY3JpLi5fX3B1Yi4uX19kaWQuLl9fZGl0Li5fX3BpZC4uX19pdC4uX192dC4uMTUwMjIxODkwMDk4MA\&adid\=1238421851\&SpotID\=38\&BanName\=6f9768ea3111e69664002590c57f96\&CampaignID\=1001287481\&SiteName\=T
View sticky.js
var el = document.querySelector(".shopper-top-menu");
var elOriginal = el.offsetTop
window.addEventListener("scroll" , function(e){
if( window.scrollY >= el.offsetTop ) {
document.body.style.paddingTop = el.offsetHeight;
el.style.position = "fixed";
el.classList.add("fixed")
el.style.width = "100%";
el.style.top = 0;
el.style.left = 0 ;
View getProductName.js
const cheerio = require("cheerio");
const rp = require("request-promise-native");
(async () => {
const html = await rp(
"https://fr.aliexpress.com/store/product/Summer-Women-Dress-Vestidos-Casual-Clothing-Female-Tropical-Bohemian-Mini-Dress-Beach-Vestidos-De-Renda-Ladies/620009_32282871144.html?spm=a2g05.8005319.2001.3.mH47kQ&sdom=703.123483.111126.0_32282871144"
);
const $ = cheerio.load(html)
const productName = $("h1.product-name")
View wtf.js
/* VT100 terminal reset (<ESC>c) */
console.log('\033c');
/* numbers comparations */
> '2' == 2
true
> '2' === 2
@a-eid
a-eid / urlencode.js
Created Jul 12, 2017
php like urlencode for javascript
View urlencode.js
// rawurlencode is more or less like encodeURIComponent
function urlencode (str) {
// php like urlencode for javascript
str = (str + '')
return encodeURIComponent(str)
.replace(/!/g, '%21')
.replace(/'/g, '%27')
.replace(/\(/g, '%28')
.replace(/\)/g, '%29')
.replace(/\*/g, '%2A')
View calcPosition.js
/* takes single number and convert it to a position
@arg:
Int: number
@returns:
String: position (ie: 1st , 2nd , 3rd , 4th ,... 101st , 1004th ...)
*/
var calcPosition = (rank) => {
let final
let length = rank.toString().length
--length
You can’t perform that action at this time.