Skip to content

Instantly share code, notes, and snippets.

View lessmore92's full-sized avatar
🎯
Focusing

Mojtaba Bahrami lessmore92

🎯
Focusing
View GitHub Profile
server {
listen 80 default_server;
server_name _;
root /var/www/html/public;
access_log /var/www/html/storage/logs/access.log;
error_log /var/www/html/storage/logs/error.log;
index index.php index.html;
@lessmore92
lessmore92 / lemp 7.2
Created July 2, 2019 11:37
Ubuntu 16.04 LEMP Stack (PHP 7.2 - mariadb)
sudo apt update && sudo apt dist-upgrade
sudo apt update
sudo apt install nginx
sudo systemctl stop nginx.service
sudo systemctl start nginx.service
sudo systemctl enable nginx.service
sudo apt-get install mariadb-server mariadb-client
@lessmore92
lessmore92 / README.md
Created June 30, 2019 14:40 — forked from jackzampolin/README.md
Insight API Queries for Explorer

GET

Transactions by block and address

This endpoint returns full transaction data for blocks and Addresses

NOTE: there is an undocumented param to paginate, didn't go digging

/**
* This polyfill is used where the Uint8Array.fill is not available on given platform.
* It will port the Array.fill function to Uint8Array.fill. So, when Uint8Array.fill is called,
* then the implementation of Array.fill will be invoked.
*
* @platfroms IE11, Safari, Android for React Native Apps.
* @author Mozilla Development Network
*/
if (!Uint8Array.prototype.fill) {
Object.defineProperty(Array.prototype, 'fill', {
@lessmore92
lessmore92 / hideOnScroll.js
Created June 6, 2019 06:50 — forked from mmazzarolo/hideOnScroll.js
react-native-action-button hide on scroll
// 1. Define a state variable for showing/hiding the action-button
state = {
isActionButtonVisible: true
}
// 2. Define a variable that will keep track of the current scroll position
_listViewOffset = 0
// 3. Add an onScroll listener to your listview/scrollview
<ListView
@lessmore92
lessmore92 / chainsnort
Created February 16, 2019 20:53 — forked from arowser/chainsnort
chainsnort (cross-platform console transaction monitor)
import json, sys, time, urllib, websocket, operator
sys.tracebacklimit = 0
t0 = time.ctime() ; Z = 0
print 'chainsnort 0.410: ' ,
def main():
global Z
while (1):
bigtag = ' '
@lessmore92
lessmore92 / JsonSerializableWithReflection.php
Created November 21, 2018 20:36 — forked from zburgermeiszter/JsonSerializableWithReflection.php
PHP JsonSerializable with Reflection in Trait
<?php
trait JsonSerialize
{
function jsonSerialize()
{
$reflect = new ReflectionClass($this);
$props = $reflect->getProperties(ReflectionProperty::IS_STATIC | ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED | ReflectionProperty::IS_PRIVATE);