Skip to content

Instantly share code, notes, and snippets.

🤔
...

Ahmed El Gabri ahmedelgabri

🤔
...
Block or report user

Report or block ahmedelgabri

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 Readme.md

Read first

I have a local file called ~/.zstuff that I load all ENV variables that is not supposed to be public like $GITHUB_TOKEN in it & I source this file inside my main .zshrc file. The $GITHUB_USER can be added to the same file or your normal .zshrc file since it not a senstive information.

The .zstuff Shoudn't be public or part of your .dotfiles repo.

@ahmedelgabri
ahmedelgabri / mq.styl
Created Dec 1, 2014
Media queries in Stylus
View mq.styl
MQ = true
mq(point, query1=min, query2=width)
if MQ
query = 'screen and (%s-%s: %sem)' % (query1 query2 point/16)
@media query
{block}
else
{block}
@ahmedelgabri
ahmedelgabri / index.jade
Created Dec 1, 2014
Add Custom Jade tags
View index.jade
doctype html
html
head
title Hi
body
div
span= formatDate('Dec 25, 1995')
View .scss-lint.yaml
# From http://sass-guidelin.es/
# For SCSS-Lint v0.31.0
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
@ahmedelgabri
ahmedelgabri / SassMeister-input-HTML.html
Created Mar 10, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<p>Lorem <a href="#">ipsum dolor</a> sit amet</p>
View bbd
#!/bin/sh
#
# Usage: bbd "Sep 14"
# bbd "Sep"
git reflog --date=local | grep "$1 .* checkout: moving from .* to" | grep -o "[a-zA-Z0-9\-]*$" | sort | uniq
@ahmedelgabri
ahmedelgabri / cicada.css
Created Jun 9, 2011 — forked from Zoramite/cicada.css
Cicada + CSS Backgrounds
View cicada.css
.example1 {
background-color: #efefef;
background-image: -webkit-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -webkit-linear-gradient(0, rgba(201,184,88,.13) 50%, transparent 50%), -webkit-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%), -webkit-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%);
background-image: -moz-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -moz-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%), -moz-linear-gradient(0, rgba(168,137,73,.17) 50%, transparent 50%), -moz-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%);
background-image: -o-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -o-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%), -o-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%), -o-linear-gradient(0, rgba(99,78,60,.19) 50%, transparent 50%);
background-image: linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), linear-gradient(0, rgba(201
View dominant-color.js
function getDominantColor(aImg) {
let canvas = document.createElement("canvas");
canvas.height = aImg.height;
canvas.width = aImg.width;
let context = canvas.getContext("2d");
context.drawImage(aImg, 0, 0);
// keep track of how many times a color appears in the image
let colorCount = {};
@ahmedelgabri
ahmedelgabri / search dash app
Created Aug 3, 2013
Shell function to search dash app http://kapeli.com/dash from the terminal
View search dash app
# usage: dash <keyword>:<query> or dash <query>
dash(){
open "dash://$@"
}
View foo.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>React for Beginners</title>
</head>
<body>
<div id="App"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.min.js"></script>
You can’t perform that action at this time.