Skip to content

Instantly share code, notes, and snippets.

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 November 15, 2016 15:16
How I solved programmatically updating window.location from a child element in a subroute using events && \<app-route>

<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 August 14, 2015 14:34
open a bash shell in running docker contianer
sudo docker exec -it {tag} bash
<!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 August 29, 2015 14:00
So you want to add your untracked files to your .gitignore
#*
* 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 December 19, 2015 14:29
start you animation with....
//Pseudo code
var id;
animate = function(time){
//Eval time
if(somethingDoneWithTimeIsTrue){
requestAnimationFrame(step)
}
}
pause = function(time){
@ishmaelahmed
ishmaelahmed / bufferlist.vim
Created October 28, 2011 13:17
VIM BUFFER LIST SCRIPT 1.3, simple way to keep track of your vim buffers
"=== 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 October 25, 2011 14:54
Removes trailing spaces in vim file and return to your starting position
" 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 October 14, 2011 12:35 — forked from remi/update-chromium-mac.rb
Running this file update /Applications/Chromium.app to the latest Chromium build.
#!/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 October 14, 2011 12:35 — forked from jehiah/get_latest_chromium.sh
script to download the latest chromium build nightly
#!/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)