Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am ishmaelahmed on github.
  • I am ishmaelahmed (https://keybase.io/ishmaelahmed) on keybase.
  • I have a public key whose fingerprint is 4089 DF15 CFCC 55FC C927 28B4 7821 BE11 28CB CBC7

To claim this, I am signing this object:

@ishmaelahmed
ishmaelahmed / gist:e2e99bb22f0ed9edd70ea3a4303a60d4
Last active Nov 15, 2016
How I solved programmatically updating window.location from a child element in a subroute using events && \<app-route>
View gist:e2e99bb22f0ed9edd70ea3a4303a60d4

<app-route>

I was having trouble figureing out how to programmatically change window.location 
from a nested child element. In my case I wanted to send up a uri from dropdown.  
The `select-item` property was bound to  `location`, and `location` had an 
observer `_updateLocation`. 
		<x-dropdown selected-item="{{location}}"></x-dropdown>
@ishmaelahmed
ishmaelahmed / gist:4c2c15c3e9b97eb8471a
Created Aug 14, 2015
open a bash shell in running docker contianer
View gist:4c2c15c3e9b97eb8471a
sudo docker exec -it {tag} bash
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
span{
position:relative;
display:inline-block;
overflow:hidden;
@ishmaelahmed
ishmaelahmed / ignoreAllUntractedFile
Last active Aug 29, 2015
So you want to add your untracked files to your .gitignore
View ignoreAllUntractedFile
#*
* This will list all the untracked files in your git
* repo and append them to .gitignore
*#
git ls-files --others --exclude-standard >> .gitignore
@ishmaelahmed
ishmaelahmed / gist:5969819
Last active Dec 19, 2015
start you animation with....
View gist:5969819
//Pseudo code
var id;
animate = function(time){
//Eval time
if(somethingDoneWithTimeIsTrue){
requestAnimationFrame(step)
}
}
pause = function(time){
@ishmaelahmed
ishmaelahmed / bufferlist.vim
Created Oct 28, 2011
VIM BUFFER LIST SCRIPT 1.3, simple way to keep track of your vim buffers
View bufferlist.vim
"=== VIM BUFFER LIST SCRIPT 1.3 ================================================
"= Copyright(c) 2005, Robert Lillack <rob@lillack.de> =
"= Redistribution in any form with or without modification permitted. =
"= =
"= INFORMATION =================================================================
"= Upon keypress this script display a nice list of buffers on the left, which =
"= can be selected with mouse or keyboard. As soon as a buffer is selected =
"= (Return, double click) the list disappears. =
"= The selection can be cancelled with the same key that is configured to open =
"= the list or by pressing 'q'. Movement key and mouse (wheel) should work as =
@ishmaelahmed
ishmaelahmed / TrimWhiteSpace.vim
Created Oct 25, 2011
Removes trailing spaces in vim file and return to your starting position
View TrimWhiteSpace.vim
" Removes trailing spaces
function! TrimWhiteSpace()
let line = line('.')
let colum = col('.') %s/+$//e
call cursor(line,colum)
endfunction
@ishmaelahmed
ishmaelahmed / update-chromium-mac.rb
Created Oct 14, 2011 — forked from remi/update-chromium-mac.rb
Running this file update /Applications/Chromium.app to the latest Chromium build.
View update-chromium-mac.rb
#!/usr/bin/env ruby
require "open-uri"
if ARGV.first
build_id = ARGV.first
else
build_id = open("http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/LAST_CHANGE") { |data| data.read }
end
build_url = "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/#{build_id}/chrome-mac.zip"
local_file_path = "/tmp/chromium-#{build_id}.zip"
@ishmaelahmed
ishmaelahmed / get_latest_chromium.sh
Created Oct 14, 2011 — forked from jehiah/get_latest_chromium.sh
script to download the latest chromium build nightly
View get_latest_chromium.sh
#!/bin/sh
## this is a quick and dirty script to automagically install the latest chromium build on OSX 10.5
## you can set this up as a nightly cron job, or run manually from the command line
# USAGE:
# save script to your home directory aka /Users/$USER/
# open up a command prompt (aka /Applications/Utilities/Terminal)
# run manually from the command line whenever you want the most recent chromium build
# $ sh get_latest_chromium.sh
# start it as a nightly task (runs at 1am or edit the plist below)