Skip to content

Instantly share code, notes, and snippets.

Avatar

Azizur Rahman azizur

View GitHub Profile
View COVID-19 Mosque Reopening.md

COVID-19 Mosque Reopening

Assumptions

  • A mosque is opening for five daily prayers (potentially multiple Jammats? this needs sharia clarification)
  • A mosque can hold multiple Jummah prayers on Fridays
  • A mosque can leave their door open for individual prayer throughout the day
  • A mosque needs to close its door for several hours for cleaning and so on
  • A mosque will have enough volunteers to deal with a potential surge in attendees and have appropriate crowd control capacity
  • Attendees can opt-to attend the mosque outside the daily prayer times
  • Attendees will leave the mosque after a fixed period (say an hour) to allow for others to attend the mosque
@azizur
azizur / withdrawInvites.js
Last active Oct 3, 2021
Manage LinkedIn Invitations
View withdrawInvites.js
var duration = ' month'; // withdraw invites older than x month.
var timeago = document.querySelectorAll('.time-badge');
var inviteActionables = document.querySelectorAll('.invitation-card__action-btn');
var nameNodes = document.querySelectorAll('.invitation-card__title');
var names = [];
function cancel_invite(cancelId, inviteNode) {
setTimeout(function () {
console.info('Withdrawing invite for', cancelId, names[cancelId]);
View keybase.md

Keybase proof

I hereby claim:

  • I am azizur on github.
  • I am azizur (https://keybase.io/azizur) on keybase.
  • I have a public key whose fingerprint is 21FB 3F78 4CAA A659 C7FE BFAE 4E18 E8A2 0A3A 7E32

To claim this, I am signing this object:

@azizur
azizur / serverless-error.sh
Created Sep 8, 2019
Serverless ApiGateway CloudWatch Role error
View serverless-error.sh
Serverless: Operation failed!
Serverless: View the full error output: https://<<region-removed>>.console.aws.amazon.com/cloudformation/home?region=<<region-removed>>#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3A<<region-removed>>%3A<<removed>>%3Astack%2F<<removed>>%2F445377b0-cea4-11e9-829d-0a2f634edb2c
Serverless Error ---------------------------------------
ServerlessError: An error occurred: IamRoleCustomResourcesLambdaExecution - API: iam:CreateRole User: arn:aws:iam::<<removed>>:user/publisher is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::<<removed>>:role/<<removed>>-IamRoleCustomResourcesLamb-55JBAFIF334L.
at provider.request.then.data (/Users/<<removed>>/projects/serverless/lib/plugins/aws/lib/monitorStack.js:121:33)
From previous event:
at AwsDeploy.monitorStack (/Users/<<removed>>/projects/serverless/lib/plugins/aws/lib/monitorStack.js:27:12)
at provider.request.then.cfData (/Users/<<removed>>/projects/serverless/lib/plugins/aws/lib/updateStack
@azizur
azizur / udi-hash.js
Last active Sep 5, 2017
Proposal for generating Unique Device Identification (UDI)
View udi-hash.js
const crypto = require('crypto');
const hash = crypto.createHash('sha256');
const hashValue = (data) => {
return hash.update(JSON.stringify(data), 'utf-8').digest('hex');
};
// generate a hash
console.log(hashValue(['userId', 'deviceId']));
// output
@azizur
azizur / paver update_assets lms
Created Mar 30, 2017
The 'XModule' distribution was not found and is required by the application
View paver update_assets lms
$ docker exec -t edx.devstack.edxapp bash -c 'source /edx/app/edxapp/edxapp_env; cd /edx/app/edxapp/edx-platform; paver update_assets lms --settings=aws --debug'
---> pavelib.assets.update_assets
---> pavelib.prereqs.install_node_prereqs
Node prereqs unchanged, skipping...
xmodule_assets common/static/xmodule
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/bin/xmodule_assets", line 6, in <module>
from pkg_resources import load_entry_point
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3030, in <module>
@_call_aside
@azizur
azizur / docker logs edx.devstack.mysql
Created Mar 30, 2017
docker logs edx.devstack.mysql
View docker logs edx.devstack.mysql
$ docker logs edx.devstack.mysql
Initializing database
2017-03-30 20:23:26 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-03-30 20:23:26 0 [Note] /usr/sbin/mysqld (mysqld 5.6.35) starting as process 43 ...
2017-03-30 20:23:26 43 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-03-30 20:23:26 43 [Note] InnoDB: The InnoDB memory heap is disabled
2017-03-30 20:23:26 43 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-03-30 20:23:26 43 [Note] InnoDB: Memory barrier is not used
2017-03-30 20:23:26 43 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-03-30 20:23:26 43 [Note] InnoDB: Using Linux native AIO
@azizur
azizur / Unknown MySQL server host 'edx.devstack.mysql' (0)
Created Mar 30, 2017
Unknown MySQL server host 'edx.devstack.mysql' (0)
View Unknown MySQL server host 'edx.devstack.mysql' (0)
OperationalError at /
(2005, "Unknown MySQL server host 'edx.devstack.mysql' (0)")
Request Method: GET
Request URL: http://localhost:18000/
Django Version: 1.8.17
Exception Type: OperationalError
Exception Value:
(2005, "Unknown MySQL server host 'edx.devstack.mysql' (0)")
Exception Location: /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/connections.py in __init__, line 193
Python Executable: /edx/app/edxapp/venvs/edxapp/bin/python
@azizur
azizur / gist:1b15ba92789a9b1f016f8c94f800b83f
Created Dec 14, 2016
Fix python site packages permission
View gist:1b15ba92789a9b1f016f8c94f800b83f
sudo chown -R $(whoami) /Library/Python/2.7/site-packages
@azizur
azizur / Producteev User - Notice of Data Breach
Created Sep 23, 2016
Producteev User - Notice of Data Breach
View Producteev User - Notice of Data Breach
Delivered-To: EMAIL_ADDRESS_REMOVED
Received: by 10.80.165.111 with SMTP id z44csp568758edb;
Fri, 23 Sep 2016 14:34:47 -0700 (PDT)
X-Received: by 10.36.111.199 with SMTP id x190mr5908699itb.61.1474666487030;
Fri, 23 Sep 2016 14:34:47 -0700 (PDT)
Return-Path: <bounces+256423-f6c7-USER_REMOVED=DOAMIN_REMOVED@emailapp.producteev.com>
Received: from o1.emailapp.producteev.com (o1.emailapp.producteev.com. [50.31.50.134])
by mx.google.com with ESMTPS id j185si11543537iof.9.2016.09.23.14.34.46
for <EMAIL_ADDRESS_REMOVED>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);