Skip to content

Instantly share code, notes, and snippets.

ahmad seleem ahmadseleem

Block or report user

Report or block ahmadseleem

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
@ahmadseleem
ahmadseleem / styles.css
Created May 26, 2018
vscode custom css
View styles.css
.vs.monaco-editor .ced-TextEditorDecorationType12-4::after {
color: mediumaquamarine !important;
/* background-color: mediumaquamarine; */
/* text-shadow: 8px -1px 0px black; */
/* box-shadow: inset 0 0 1px black; */
}
View Roman_numbers.rb
# Convert Decimals to Roman numerals...
#
module Roman
ROMAN_STEPS =
{
'M' => 1000, 'CM' => 900,
'D' => 500, 'CD' => 400,
'C' => 100, 'XC' => 90,
'L' => 50, 'XL' => 40,
'X' => 10, 'IX' => 9,
View swap_once.rb
#
# Check if an Array could be sorted by One-Swap.
#
# Extend Array Class...
class Array
def sorted?
# each_cons(2).all? { |a, b| (a <=> b) <= 0 }
self == self.sort
end
@ahmadseleem
ahmadseleem / Viewport_Resizer_bookmarklet
Created Nov 1, 2014
VIEWPORT RESIZER - RESPONSIVE DESIGN BOOKMARKLET - Customized ( iphone 6 & 6 plus added )
View Viewport_Resizer_bookmarklet
javascript:void((function(d){if(self!=top||d.getElementById('toolbar')&&d.getElementById('toolbar').getAttribute('data-resizer'))return%20false;d.write('<!DOCTYPE%20HTML><html%20style="opacity:0;"><head><meta%20charset="utf-8"></head><body><a%20data-viewport="320x480"%20data-icon="mobile"%20title="Mobile%20(e.g.%20Apple%20iPhone)">Mobile%20(e.g.%20Apple%20iPhone)</a><a%20data-viewport="320x568"%20data-icon="mobile"%20data-version="5"%20title="Apple%20iPhone%205">Apple%20iPhone%205</a><a%20data-viewport="375x667"%20data-icon="mobile"%20data-version="6"%20title="Apple%20iPhone%206">Apple%20iPhone%206</a><a%20data-viewport="414x736"%20data-icon="mobile"%20data-version="6p"%20title="Apple%20iPhone%206p">Apple%20iPhone%206p</a><a%20data-viewport="600x800"%20data-icon="small-tablet"%20title="Small%20Tablet">Small%20Tablet</a><a%20data-viewport="768x1024"%20data-icon="tablet"%20title="Tablet%20(e.g.%20Apple%20iPad%202-3rd,%20mini)">Tablet%20(e.g.%20Apple%20iPad%202-3rd,%20mini)</a><a%20data-viewport="1280x800"%20dat
View yd.sh
#!/bin/zsh
# Download YouTube video:
cd ~/Downloads/
for file in "$@"
do
name=$(echo "$file" | cut -d '&' -f 1)
youtube-dl -o "%(title)s.%(ext)s" "$name"
done
View times.swift
extension Int {
func times(task: () -> () ) {
for i in 0..<self {
task()
}
}
}
10.times { println("Hello!") }
View .emacs
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
;; ................................................................
(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
(setq evil-shift-width 2)
View after.vimrc
" ================ General Config ====================
set nuw=3
let g:Powerline_symbols = 'compatible'
set number "Line numbers are good
set backspace=indent,eol,start "Allow backspace in insert mode
set history=1000 "Store lots of :cmdline history
set showcmd "Show incomplete cmds down the bottom
set showmode "Show current mode down the bottom
set gcr=a:blinkon0 "disable cursor blink
@ahmadseleem
ahmadseleem / index.html
Created Mar 29, 2013
A CodePen by Anonymous. Simple, CSS only, responsive menu - Enjoy!
View index.html
<head>
<meta name="viewport" content="width=device-width">
</head>
<div class="wrap">
<span class="decor"></span>
<nav>
<ul class="primary">
<li>
<a href="">Dog</a>
<ul class="sub">
View eventUtility.js
var eventUtility = {
addEvent : function(el, type, fn) {
if (typeof addEventListener !== "undefined") {
el.addEventListener(type, fn, false);
} else if (typeof attachEvent !== "undefined") {
el.attachEvent("on" + type, fn);
} else {
el["on" + type] = fn;
}
},
You can’t perform that action at this time.