Skip to content

Instantly share code, notes, and snippets.

aleemb aleemb

Block or report user

Report or block aleemb

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
View workbox-4.3.1-notes.js
/* globals importScripts, workbox */
if (workbox) {
console.log(`Yay! Workbox is loaded 🎉`);
} else {
View gist:a36d07f54dd75bb51dc9acc74ec2677e
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
View firebase_iid_persistence.js
// Request permission to receive notifications via dialog
messaging.requestPermission().then(function(result) {
// Permission granted.
messaging.getToken().then(function(currentToken) {
// Got IID. Persist to server and track state in localStorage
var persistedIID = localStorage.getItem('messaging.persistedIID');
if (persistedIID != currentToken) {
$.post('/iid', {'iid': currentToken}, function() {
localStorage.setItem('messaging.persistedIID', currentToken);
View organize_itunes.scpt
-- V3
set root to "/Users/aleemb/Music/aleem"
set musicExtensions to {"mp3", "m4a"}
View Converter.php
namespace CommonMark;
use CommonMark\Inline\Processor\YouTubeVideoProcessor;
use CommonMark\Inline\Renderer\YouTubeVideoRenderer;
use League\CommonMark\Converter;
use League\CommonMark\Environment;
use League\CommonMark\DocParser;
View suggest.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
#menu {
margin: 0;
width: 200px;
display: none;
## calculate the probability of server winning a single game,
## given p(winning single point) and current point score
## some results and commentary here:
def fact(x):
if x in [0, 1]: return 1
r = 1
for a in range(1, (x+1)): r = r*a
View social-sharing-alignment.html
<div class="social">
<span class="twitter">
<a href="" class="twitter-share-button" data-url="[your-url-here]">Tweet</a>
<span class="google">
<g:plusone size="medium" href="[your-url-here]"></g:plusone>
<span class="Facebook">
<iframe src="[your-url-here]&amp;show_faces=false&amp;layout=button_count" scrolling="no" frameborder="0" style="height: 21px; width: 100px" allowTransparency="true"></iframe>
You can’t perform that action at this time.