Skip to content

Instantly share code, notes, and snippets.

View sohailalam2's full-sized avatar
🙇
Stay Hungry, Stay Foolish

Sohail Alam sohailalam2

🙇
Stay Hungry, Stay Foolish
View GitHub Profile
@sohailalam2
sohailalam2 / starter.sh
Last active August 29, 2015 14:10 — forked from danro/starter.sh
#!/bin/sh
if [ $(ps aux | grep $USER | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ]
then
export PATH=/usr/local/bin:$PATH
export NODE_ENV=production
cd /path/to/app && forever --spinSleepTime 10000 start server.js >> forever.log 2>&1
fi
// Using a wrapper function to prevent global namespace pollution
(function () {
var tempArray = [], // the final flattened array
idx = 0; // the position of elements in the flattent result array
/**
* A helper function to actually flatten the array
* @param array The given array as input
* @param inner A parameter to identify whether or not the function is recursively called
* @returns {*} Returns a flattened array
@sohailalam2
sohailalam2 / softmax.js
Created January 18, 2017 14:51 — forked from vladimir-ivanov/softmax.js
softmax function implementation in js
let softmax = (arr) => (index) => Math.exp(arr[index]) / arr.map(y => Math.exp(y)).reduce((a, b) => a + b);
@sohailalam2
sohailalam2 / s3-test.php
Created March 1, 2017 11:12
AWS S3 using PHP
<!--
Setup to connect to AWS S3 in PHP
1. Install Composer:
Using Composer is the recommended way to install the AWS SDK for PHP.
curl -sS https://getcomposer.org/installer | php
2. Run the Composer command to install the latest stable version of the SDK:
@sohailalam2
sohailalam2 / README.md
Created April 17, 2017 08:52 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@sohailalam2
sohailalam2 / SCSS.md
Created April 18, 2018 18:04 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@sohailalam2
sohailalam2 / countries.json
Created July 6, 2019 10:23
Countries with Country Code
[
{
"name": "Afghanistan",
"code": "AF"
},
{
"name": "Åland Islands",
"code": "AX"
},
{
@sohailalam2
sohailalam2 / unwatch-github-org-repos.js
Last active September 24, 2019 10:36
Unwatch All Org Repos Automation
// Navigate to https://github.com/watching and then run:
// Taken from: https://gist.github.com/offirgolan/9b12a2a170f70d0d70e2238e8661e382#gistcomment-2986393
(() => {
const org = 'getndazn'
const nodes = document.querySelectorAll('.Box-row');
const rows = [ ...nodes ];
const orgRows = rows.filter((e) => e.innerText.startsWith(` ${org}/`));
const orgUnsubButtons = orgRows.map(row => row.querySelector('button.select-menu-item[value="included'));
@sohailalam2
sohailalam2 / gist:60ffced3f14f9a9f74997cbaf5aca87f
Created October 23, 2019 13:28 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sohailalam2
sohailalam2 / keybase.md
Last active January 12, 2020 23:30
keybase.md

Keybase proof

I hereby claim:

  • I am sohailalam2 on github.
  • I am sohailalam2 (https://keybase.io/sohailalam2) on keybase.
  • I have a public key ASD9VJ_Wp2kTA5HTrWlA1qhy277essDa0zMLIgoUk7ND7Qo

To claim this, I am signing this object: