Skip to content

Instantly share code, notes, and snippets.

View mudassir0909's full-sized avatar
🦇
What next, Github Stories?

Mudassir Ali mudassir0909

🦇
What next, Github Stories?
View GitHub Profile
@mudassir0909
mudassir0909 / chia_plotting.sh
Created May 13, 2021 08:02
Chia plotting automation
# This is for OSX, for others refer https://github.com/Chia-Network/chia-blockchain/wiki/CLI-Commands-Reference
PATH=/Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon:$PATH
local DEST_DIR="/Volumes/seagate_ma_0/chia_cli_plots/"
local RAM_USAGE=4000
local THREAD_COUNT=4
local STAGGER=7200 # 2 hours
# Usage:
# chia_plot 5 /Volumes/myssd/
{
"basics": {
"name": "Mudassir Ali",
"label": "Senior Frontend Engineer",
"picture": "https://en.gravatar.com/userimage/43915741/c8b27f3d9d1b9371afb9e59f78bde13d.jpg?size=200",
"phone": "",
"website": "https://registry.jsonresume.org/mudassir0909",
"summary": "Web frontend engineer with a passion for building large web applications that scale. Has a good sense of UI/UX design.",
"location": {
"city": "Sydney",
@mudassir0909
mudassir0909 / ios-safari-debug.md
Last active October 2, 2019 06:21
Debug your website on a specific iOS Safari version from on a Mac

I recentlty had to fix a CSS bug that was only happening on a web view on a certain iPhone 7 and I tried replicating it on my iPhone but I couldn't.

Step 1: Determine the iOS Safari version

Since, WebView uses Safari underneath, I had to first determine which version of iOS Safari is installed. Turns out to know that you just have to know the iOS software version itself as Safari also mirrors the same version.

You can find that out inside Settings > General > About. Scroll until you find it. I found out the iPhone 7 had 11.2.X.

The following step assumes that either

  • You do not have an iPhone
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2014
Copyright (C) 2014 Addy Osmani @addyosmani
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@mudassir0909
mudassir0909 / selectize_no_results.js
Created July 24, 2014 13:56
A hacky plugin to display "No results found" message on selectize. Don't use this along with "dropdown_header" plugin though.
/*
https://github.com/brianreavis/selectize.js/issues/470
Selectize doesn't display anything to let the user know there are no results.
This is a temporary patch to display a no results option when there are no
options to select for the user.
*/
Selectize.define( 'no_results', function( options ) {
var self = this;
@mudassir0909
mudassir0909 / clear_selection.js
Created June 10, 2014 13:02
Selectize plugin which gives an option to clear selection
Selectize.define( 'clear_selection', function ( options ) {
var self = this;
//Overriding because, ideally you wouldn't use header & clear_selection simultaneously
self.plugins.settings.dropdown_header = {
title: 'Clear Selection'
};
this.require( 'dropdown_header' );
self.setup = (function () {
@mudassir0909
mudassir0909 / selectable_placeholder.js
Last active September 30, 2017 03:18
Selectable Placeholder for selectize dropdown plugin
Selectize.define('selectable_placeholder', function( options ) {
var self = this;
options = $.extend({
placeholder: self.settings.placeholder,
html: function ( data ) {
return (
'<div class="selectize-dropdown-content placeholder-container">' +
'<div data-selectable class="option">' + data.placeholder + '</div>' +
'</div>'
@mudassir0909
mudassir0909 / stopwatch.js
Last active December 31, 2015 04:29
My own version of Stop Watch Library
(function(){
/*
polyfills for IE8
*/
if(!Array.prototype.forEach){
Array.prototype.forEach = function(callback){
for(var i=0; i<this.length; i++){
callback(this[i]);
}
}
@mudassir0909
mudassir0909 / ember_unknown_property_hook.js
Last active August 22, 2016 13:15
Ember unknownProperty & setUnknownProperty hooks defined inside Ember.Observable mixin
// Little background about unknown properties
var myObject = Ember.Object.create({name: 'hi'}); // a plain simple ember object
/*
all the properties defined on the object are known properties
so the property "name" is a known property for myObject,
but any other properties which are not defined on this object are unknown properties
*/
// age is an unknown property as we did not set "age" yet
myObject.get("age"); // => undefined