Skip to content

Instantly share code, notes, and snippets.

View emalgholzad's full-sized avatar

Emal emalgholzad

View GitHub Profile
$spacer: 4px !default;
$spacer-x: $spacer !default;
$spacer-y: $spacer !default;
$spacers: (
none: (
x: 0,
y: 0
),
sm: (
// Scheme of colors
$colorscheme: (
gray: (
base: #ccc,
light: #f2f2f2,
dark: #666
),
brown: (
base: #ab906b,
light: #ecdac3,
@emalgholzad
emalgholzad / remove.bash
Created March 7, 2017 09:59
Remove all files starting with a certain string
Delete all files in current directory and its sub-directories where the file name starts with "foo":
$ find . -type f -name foo\* -exec rm {} \;
.declaration-order {
/* Positioning */
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 100;
/* Box-model */
@emalgholzad
emalgholzad / sendYourResume.php
Last active March 7, 2018 15:18
Dare.it linkedin post rewrite in simple PHP function
<?php
function sendYourResume($language, $experience)
{
$result = '';
switch (TRUE) {
case ($language === "PHP" && $experience >= 5):
$result = "we are looking for senior developers.";
break;
@emalgholzad
emalgholzad / wp-analytics.php
Created March 20, 2018 13:08
Google Analytics snippet in functions.php
<?php
//include GA tracking code before the closing head tag
add_action('wp_head', 'google_analytics_tracking_code');
function google_analytics_tracking_code() { ?>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
@emalgholzad
emalgholzad / remove-remote-local-tags.sh
Created April 16, 2018 14:09 — forked from okunishinishi/Remove all git tags
Delete all git remote tags (remote and local)
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@emalgholzad
emalgholzad / outline-bemit.css
Created April 24, 2018 08:00
Outline BEMIT
/**
* Outline all classes.
*/
[class] {
outline: 5px solid lightgrey;
}
/**
* Outline all BEM Elements.
*/
const COLOR = {
keys: {
gray: 'gray',
ultraLight: 'ultra-light',
veryLight: 'very-light',
bright: 'bright',
veryDark: 'very-dark',
veryDarkGray: 'very-dark-gray',
},
ranges: [
@emalgholzad
emalgholzad / layer.js
Created June 7, 2018 13:36
Sketch API layer class type
// Old way
export const LAYERTYPES = {
symbol: {
master: 'MSSymbolMaster',
instance: 'MSSymbolInstance',
},
artboard: 'MSArtboardGroup',
text: 'MSTextLayer',
group: 'MSLayerGroup',
shape: 'MSShapeGroup',