Skip to content

Instantly share code, notes, and snippets.

View muhammaddadu's full-sized avatar
✍️
Building something probably

Muhammad Dadu muhammaddadu

✍️
Building something probably
View GitHub Profile
@muhammaddadu
muhammaddadu / github-add-colaborator
Created April 6, 2020 15:06
Bulk add colaborators. to github
#!/bin/bash
function help {
echo "Add collaborators to one or more repositories on github"
echo ""
echo "Syntax: $0 -u user [-l] [-D] -r repo1,repo2 <collaborator id>"
echo ""
echo " -u OAuth token to access github"
echo " -l list collaborators"
echo " -r repositories, list as owner/repo[,owner/repo,...]"
00:00
sudo npm install -g credstash-cli expo-cli00:49
Exit code: 1
#!/bin/bash -eo pipefail
sudo npm install -g credstash-cli expo-cli
[..................] / rollbackFailedOptional: verb npm-session d7e19e1c1bacc66
[..................] / rollbackFailedOptional: verb npm-session d7e19e1c1bacc66
[..................] \ rollbackFailedOptional: verb npm-session d7e19e1c1bacc66
@muhammaddadu
muhammaddadu / Box.sol
Created November 26, 2018 00:17
Box.sol
pragma solidity ^0.4.23;
contract Box {
address public owner;
uint public pricePerDay; // in wei?
int public lat; // lattitude multiplied by 10 000?
int public long; // longitude multiplied by 10 000?
string dimentions; // L*W*H in cm
address public productContract;
@muhammaddadu
muhammaddadu / adb-tools.sh
Last active November 21, 2018 23:56
~/.profile (My FireTV)
##
# Instalation
# download the file
# source it
##
DOWNLOADS_DIR="/sdcard/Download"
PROFILE_FILE="/sdcard/.profile"
howto-root-firetvstick-1() {
##
# Shorthand Stuff
##
alias qfind="find . -name "
alias pg='ps aux | grep' #requires an argument
alias openports='netstat -nape --inet'
alias ll="ls -l"
alias show_hidden="defaults write com.apple.finder AppleShowAllFiles YES"
alias hide_hidden="defaults write com.apple.finder AppleShowAllFiles NO"
@muhammaddadu
muhammaddadu / debug-docker-config.sh
Created September 18, 2018 19:22 — forked from augustovictor/debug-docker-config.sh
Debug vscode docker es6
# docker-compose.yml
...
command: npm run debug
ports:
- "3000:3000"
- "9229:9229"
...
--------------------------------------------------------
@muhammaddadu
muhammaddadu / docker-compose-gitlab.yml
Created April 30, 2018 22:20 — forked from cweilguny/docker-compose-gitlab.yml
A docker-compose config in v3 format for nginx-proxy with separate containers for nginx, dockergen and letsencrypt-companion. Additional example on how to get GitLab docker container running with this nginx-proxy setup. You need to create the docker network before, just run 'docker network create nginx-proxy'. Docker will tell you so if you don'…
version: '3'
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
nginx['listen_port'] = 80
@muhammaddadu
muhammaddadu / findVersionDifferences
Created January 16, 2017 16:05
comparse two node_module folders for versions
#!/usr/bin/env node
const path = require('path');
const fs = require('fs');
const _ = require('lodash');
let p = (...args) => path.join.apply(this, [__dirname, '..', ...args]);
const NODE_MODULES_DIR = p('node_modules');
const NODE_MODULES_COMPARE_DIR = p('node_modules.bk');
const MANIFEST = require(p('package.json'));
@muhammaddadu
muhammaddadu / Dockerfile
Last active January 5, 2017 12:04
Dockerfile for AEM 6.1
FROM java:7
RUN mkdir /opt/aem/
WORKDIR /opt/aem/
EXPOSE 4502
ADD ./AEM_6.1_Quickstart.jar /opt/aem/AEM_6.1_Quickstart.jar
ADD ./license.properties /opt/aem/license.properties
RUN java -jar AEM_6.1_Quickstart.jar -unpack -v
@muhammaddadu
muhammaddadu / Example.IonicMultipleTabs.js
Created November 4, 2016 00:31
Example of a function which can add views for multiple tabs easily
function traverseReplace(find, replace, object, dest) {
Object.keys(opts).forEach(function (key) {
var copy = object[key];
key = key.replace(find, replace);
if (typeof copy === 'object') {
dest[key] = {};
return traverseReplace(find, replace, copy, dest[key]);
}
if (typeof copy === 'string') {
dest[key] = copy.replace(find, replace);