Skip to content

Instantly share code, notes, and snippets.

View abdul's full-sized avatar
🎯
Focusing

Abdul Qabiz abdul

🎯
Focusing
View GitHub Profile
@abdul
abdul / ServerlessDeployBot.yml
Created August 18, 2017 06:20 — forked from ncloward/ServerlessDeployBot.yml
Serverless Deploy Bot Permissions
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Cloudformation stack to manage permission to deploy a serverless service'
Parameters:
ServiceName:
Description: Name of the Service you want to deploy
Type: String
Resources:
@abdul
abdul / docker-compose.yml
Created August 25, 2017 11:28 — forked from 17xande/snipe-it docker-compose.yml
test docker-compose file for Snipe-IT
version: "3"
services:
snipeit:
env_file: ./snipe-it.env
image: snipe/snipe-it
depends_on:
- mysql
ports:
- "80:80"
volumes:
@abdul
abdul / ICO.sol
Created September 11, 2017 16:46
Simple contract for ICO
pragma solidity ^0.4.11;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal returns (uint256) {
uint256 c = a * b;
@abdul
abdul / filecoin.rb
Created September 11, 2017 17:31 — forked from stefanobernardi/filecoin.rb
Filecoin cap calculation
coins = 0.00 # just to initialize.
price = 1.00 # the price Filecoin states is the minimum
amount_raised = 52000000.00 # they've said they already sold $52M in the presale
total_filecoin_sold = 85000000.00 # the number of Filecoins already sold in the presale. This would be $52M/price (price was $0.75 and investors could choose up to 30% discount. I'm using 85M coins as an assumption (min 69M max 99M).
average_investment = 100000.00 # I'm already being generous here
while total_filecoin_sold < (200000000.00 - coins) do # 200M is the max amount of coins
price = amount_raised/40000000.00 # this is their function, it's always more than $1
price = price * 0.9 # if you want to model an average discount people will choose
coins = average_investment / price # the amount of coins you get with every investment
amount_raised = amount_raised + average_investment # let's add the investment to the total raised
0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
@abdul
abdul / BasicToken.sol
Created January 12, 2018 11:53
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.19+commit.c4cbbb05.js&optimize=false&gist=
pragma solidity ^0.4.18;
import './ERC20Basic.sol';
import './SafeMath.sol';
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
* https://github.com/OpenZeppelin/zeppelin-solidity/
*/
@abdul
abdul / truffle-config.js
Created April 1, 2018 09:04 — forked from tomconte/truffle-config.js
Example Truffle 3.0 configuration file to allow deploying contracts to an Azure "Bletchley" Ethereum consortium network. Based on the Truffle docs for Infura (http://truffleframework.com/tutorials/using-infura-custom-provider).
var bip39 = require("bip39");
var ethwallet = require('ethereumjs-wallet');
var ProviderEngine = require("web3-provider-engine");
var WalletSubprovider = require('web3-provider-engine/subproviders/wallet.js');
var Web3Subprovider = require("web3-provider-engine/subproviders/web3.js");
var Web3 = require("web3");
// Insert raw hex private key here, e.g. using MyEtherWallet
var wallet = ethwallet.fromPrivateKey(Buffer.from('abcdef', 'hex'));
@abdul
abdul / user.action
Created April 11, 2018 13:11 — forked from sx2008/user.action
Privoxy User Action file
######################################################################
#
# File : $Source: /cvsroot/ijbswa/current/user.action,v $
#
# $Id: user.action,v 1.9 2008/03/27 18:27:37 fabiankeil Exp $
#
# Purpose : User-maintained actions file, see
# http://www.privoxy.org/user-manual/actions-file.html
#
######################################################################
@abdul
abdul / tree_extension_storage.js
Last active January 9, 2020 10:13
Firefox - Tree Style Tab Customization
{"requestingPermissions":null,"cachedExternalAddons":[],"notifiedFeaturesVersion":3,"style":"plain-dark","scrollbarMode":3,"userStyleRules":"/* Show title of unread tabs with red and italic font */\n/*\n.tab.unread .label {\n color: red !important;\n font-style: italic !important;\n}\n*/\n\n/* Add private browsing indicator per tab */\n/*\n.tab.private-browsing .label:before {\n content: \"🕶\";\n}\n*/\n/* Show title of unread tabs with red and italic font */\n\n/*.tab.unread .label { \ncolor: red !important; font-style: italic !important;}*/\n\n/* Add private browsing indicator per tab */\n/*.tab.private-browsing .label:before {content: \\\"🕶\\\";}*/\n\n/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar. */ \n\n#tabbar { border: 0; overflow-y: scroll !important; margin-left: -18px !important; }\n\n/* Hide .twisty and adjust margins so favicons have 7px on left. */\n\n.tab .twisty { visibility: hidden; /* margin-left: -2px; */}\n\n/* Push tab labels slightly
@abdul
abdul / dnscrypt-blacklist.txt
Created April 20, 2018 04:07
macos - dnsmasq + dnssec + dnscrypt-proxy + privoxy configuration
###########################
# Blacklist #
###########################
## Rules for name-based query blocking, one per line
##
## Example of valid patterns:
##
## ads.* | matches anything with an "ads." prefix