Skip to content

Instantly share code, notes, and snippets.

View donpaul120's full-sized avatar
🏠
Working from home

Paul Okeke donpaul120

🏠
Working from home
View GitHub Profile
@rony4d
rony4d / BEP20.sol
Created November 3, 2020 09:47
This file is a template for the Binance Smart Chain token standard that extends ERC-20, the most common Ethereum token standard.
pragma solidity 0.5.16;
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the token decimals.
// Converted to Swift 4 by Swiftify v4.1.6680 - https://objectivec2swift.com/
import AVFoundation
import libkern
class FLTSavePhotoDelegate: NSObject, AVCapturePhotoCaptureDelegate {
private(set) var path = ""
private(set) var result = FlutterResult()
/// Used to keep the delegate alive until didFinishProcessingPhotoSampleBuffer.
private var selfReference: FLTSavePhotoDelegate?
@danharper
danharper / CatchAllOptionsRequestsProvider.php
Last active May 23, 2022 04:03
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@dodyg
dodyg / gist:5823184
Last active March 29, 2024 03:59
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh