Skip to content

Instantly share code, notes, and snippets.

Ahmed Ayoub Nilegfx

Block or report user

Report or block Nilegfx

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
@Nilegfx
Nilegfx / gist:959c78dfe06a87ae88aafb7771e9f390
Created Nov 16, 2017 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:959c78dfe06a87ae88aafb7771e9f390
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
View withwael
[{
"id": 1,
"first": "Conney",
"last": "Woodall",
"gender": "Male",
"level": 4301
}, {
"id": 2,
"first": "Ingeborg",
"last": "Cuthill",
View json
[{
"id": 1,
"first_name": "Taber",
"last_name": "Atlay",
"gender": "Male",
"value": 8326
}, {
"id": 2,
"first_name": "Grace",
"last_name": "Petow",
View jasmine-standalone-runner
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine-html.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/boot.min.js"></script>
@Nilegfx
Nilegfx / ancestors.js
Created Apr 2, 2016 — forked from h2non/ancestors.js
Recursively inspect the prototype chain inheritance of a given object in JavaScript (inspired in Ruby's Class.ancestors)
View ancestors.js
// Under WTFPL license ;)
function ancestors(obj) {
var hierarchy = [];
if (['boolean', 'number', 'string', 'undefined'].indexOf(typeof obj) !== -1 || obj === null) { // primitives types
obj = Object(obj);
} else if (typeof obj === 'function') {
hierarchy.push(
obj.name ||
(obj.toString().match(/function (\w*)/) ||
obj.toString().match(/\[object (\w*)\]/))[1] ||
View Sass mixin - targeting specific browser
/* ======== description =======
Author: Ahmed ayoub Hussain
should be used in conjunction with Conditional HTML comments in the base layout:
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
/* ============================
View responsive.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
View key-bindings.json
[
{
"keys": ["ctrl+w"],
"command": "run_multiple",
"args": {
"commands": [
{"command": "find_under_expand", "args": null, "context": "window"},
{"command": "show_panel", "args": {"panel": "find"}, "context": "window"}
]
}
@Nilegfx
Nilegfx / gist:3754009 Cross-Browser ::before and ::after pseudo-class polyfill
View gist:3754009
/* =============================================================================
CSS Declarations
========================================================================== */
/* ==|== The Standard Way =================================================== */
.foo::before {
/* ...css rules... */
}
You can’t perform that action at this time.