Skip to content

Instantly share code, notes, and snippets.

@TheRyanMiller
TheRyanMiller / SafeMath.sol
Created February 16, 2021 06:18
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.6.0 <0.7.0;
pragma experimental ABIEncoderV2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
[ v3_req ]
# Extensions to add to a certificate request
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
# OpenSSL root CA configuration file.
# Copy to `/root/ca/openssl.cnf`.
[ ca ]
# `man ca`
default_ca = CA_default
[ CA_default ]
# Directory and file locations.
dir = ~/ca
pipeline {
agent any
stages {
stage('testing pipeline'){
steps{
echo 'test1'
sh 'pwd'
}
}

Keybase proof

I hereby claim:

  • I am theryanmiller on github.
  • I am ryanmiller (https://keybase.io/ryanmiller) on keybase.
  • I have a public key whose fingerprint is 3B99 DEA5 1EE0 EDAC DF4B 7158 5FA6 9337 22DF 2D95

To claim this, I am signing this object:

@TheRyanMiller
TheRyanMiller / RequestingPermissions.java
Last active June 1, 2016 01:19
Requesting Permissions
private static final int MY_PERMISSIONS_REQUEST_SEND_SMS = 1; //Custom value identifier for permission req
private static final int MY_PERMISSIONS_REQUEST_READ_CONTACTS = 2;
if (ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.SEND_SMS) != PackageManager.PERMISSION_GRANTED){
//Permission is not granted
}
else{
success = sendSms(msg, smsRecipient);
if(success==false) {
Toast.makeText(MainActivity.this,"Need to enter a valid ph# & text before you can send",Toast.LENGTH_SHORT).show();
// method to get name, contact id, and birthday
private Cursor getContactsBirthdays() {
Uri uri = ContactsContract.Data.CONTENT_URI;
String[] projection = new String[] {
ContactsContract.Contacts.DISPLAY_NAME,
ContactsContract.CommonDataKinds.Event.CONTACT_ID,
ContactsContract.CommonDataKinds.Event.START_DATE
};