This file contains 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
def reverse(self): | |
if self.first == None or self.first.next == None: | |
# list is empty or has just one element, | |
# there's nothing to do | |
return | |
previous = None | |
current = self.first | |
next = current.next |
This file contains 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
#!/bin/bash | |
current_network="$(iwgetid -r)" | |
if [[ -z $current_network ]]; then | |
echo "Not connected to network :(" | |
exit | |
fi | |
echo Your network is $current_network | |
echo "$(sudo cat /etc/NetworkManager/system-connections/$current_network | grep ^psk= | sed "s/psk=/Password is: /")" |
This file contains 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 request = require('request@2.27.0'); | |
function get_rate(json_body){ | |
// parse the response to get current price. | |
return json_body.bpi.USD.rate; | |
} | |
module.exports = function (ctx, done) { | |
var date = new Date(); | |
var current_hour = date.getHours(); |
This file contains 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
<div class="card"></div> | |
<form action="#"> | |
<label>Credit Card Number </label> | |
<input type="text" name="number" /> | |
<label>Expiration</label> | |
<input type="text" placeholder="MM/YY" name="expiry"/> |
This file contains 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
class Node: | |
# ... | |
def __hash__(self): | |
return id(self) | |
my_node = Node() | |
my_hash = {my_node: "It's there!"} | |
print(my_hash[my_node]) |
This file contains 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 gradle:4.10.0-jdk8 | |
USER root | |
ENV SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip" \ | |
ANDROID_HOME="/usr/local/android-sdk" \ | |
ANDROID_VERSION=25 \ | |
ANDROID_BUILD_TOOLS_VERSION=27.0.3 \ | |
ANDROID_ABI=armeabi-v7a \ | |
AVD_NAME=Nexus_5X_API_28 |
This file contains 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
import web3 | |
min_registry_abi = [ | |
{ | |
"name": "getAddressForString", | |
"constant": True, | |
"inputs": [{ | |
"type": "string" | |
}], | |
"outputs": [{ |
This file contains 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
{"claims":[{"url":"https://black-chocolate.martinvol.com","timestamp":1593729237,"type":"ATTESTATION_SERVICE_URL"}],"meta":{"address":"0x02DC997790352E12fA90eb1A937dFeF4bF8Dbbc0","signature":"0xadb843fe4da0e949b0caa167adb65ac6145ffe02d2eec22896506865dd074b0d4687d0ddd2b9e3e004f9335c1690aa4f7aca5b740dd8fde3801d1cbc169f83c21c"}} |
This file contains 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
{"claims":[{"url":"https://garoto.martinvol.com","timestamp":1593732517,"type":"ATTESTATION_SERVICE_URL"}],"meta":{"address":"0xe34CD052e59fF830b286a125c52Dde568AC8BD48","signature":"0xb05bb1dd83f799fbe6b10289fb92679b492c4157f580f329b81a05e3b695ed2666226c19dffb4257077b9d1ec31010f8b347c1c9eae97cd141d0e622b24b46f01c"}} |
This file contains 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
class Startup { | |
private static async example_payment() { | |
const headers = { | |
'Accept': 'application/json', | |
'Content-Type': 'application/x-www-form-urlencoded', | |
'Authorization': 'Basic ' + Buffer.from('sk_test_RNf1bOpZ1h6nN3tOucucRCMs').toString('base64') | |
} | |
// create a customer |
OlderNewer