Skip to content

Instantly share code, notes, and snippets.

View azizur's full-sized avatar

Azizur Rahman azizur

View GitHub Profile
// Visit https://www.linkedin.com/my-items/saved-jobs/?cardType=ARCHIVED
// window.location.replace('https://www.linkedin.com/my-items/saved-jobs/?cardType=ARCHIVED');
(function clanupSavedJobs() {
setInterval(() => {
const results = document.querySelectorAll('.entity-result__actions-overflow-menu-dropdown');
results.forEach((entry, index) => {
setTimeout(() => {
const button = entry.querySelector('button');
button.click();

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 / linkedin-withdraw-invites.js
Last active April 27, 2024 06:10
Manage LinkedIn Invitations
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__tvm-title");
var names = [];
function cancel_invite(cancelId, inviteNode) {
setTimeout(function () {
console.info("Withdrawing invite for", cancelId, names[cancelId]);

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 September 8, 2019 16:17
Serverless ApiGateway CloudWatch Role error
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 April 27, 2024 06:11
Proposal for generating Unique Device Identification (UDI)
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 March 30, 2017 22:58
The 'XModule' distribution was not found and is required by the application
$ 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 March 30, 2017 22:26
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 March 30, 2017 22:11
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 December 14, 2016 12:16
Fix python site packages permission
sudo chown -R $(whoami) /Library/Python/2.7/site-packages