This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Two dashes start a one-line comment. | |
| --[[ | |
| Adding two ['s and ]'s makes it a | |
| multi-line comment. | |
| --]] | |
| ---------------------------------------------------- | |
| -- 1. Variables and flow control. | |
| ---------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "did": "did:plc:eseoyklmv42do4rllmnakszt" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from web3 import Web3 | |
| from time import sleep | |
| from web3.constants import MAX_INT | |
| from web3.middleware import ExtraDataToPOAMiddleware | |
| rpc_url = "https://polygon-bor-rpc.publicnode.com" # Polygon rpc url | |
| priv_key = "" # Polygon account private key (needs some MATIC) | |
| pub_key = "" # Polygon account public key corresponding to private key | |
| chain_id = 137 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Script to fetch all repos under a git organization | |
| # Returns last committer to master and date of commit | |
| # Results sorted by commit date | |
| # Replace ORG_NAME, USERNAME, and PASSWORD variables | |
| import urllib2 | |
| import requests | |
| import json | |
| ORG_NAME = 'my-org' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env bash | |
| ### | |
| # | |
| # install_mysql.sh | |
| # | |
| # This script assumes your Vagrantfile has been configured to map the root of | |
| # your application to /vagrant and that your web root is the "public" folder | |
| # (Laravel standard). Standard and error output is sent to | |
| # /vagrant/vm_build.log during provisioning. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| require 'fileutils' | |
| errors = [] | |
| folderA = 'folder1' | |
| folderB = 'folder2' | |
| # list all files in each folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var http = require('http'), | |
| httpProxy = require('http-proxy'); | |
| // Create a proxy server with custom application logic | |
| var proxy = httpProxy.createProxyServer({}); | |
| // | |
| // Create your custom server and just call `proxy.web()` to proxy | |
| // a web request to the target passed in the options | |
| // also you can use `proxy.ws()` to proxy a websockets request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| redis-cli keys "TripVo*" | cut -d" " -f 2 | xargs redis-cli del |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // source: http://doublespringlabs.blogspot.com.br/2012/11/decoding-polylines-from-google-maps.html | |
| function decode(encoded){ | |
| // array that holds the points | |
| var points=[ ] | |
| var index = 0, len = encoded.length; | |
| var lat = 0, lng = 0; | |
| while (index < len) { | |
| var b, shift = 0, result = 0; |
NewerOlder