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
// Marcin Krzyżanwski | |
// Code for https://github.com/krzyzanowskim/CryptoSwift/issues/20 | |
// PHP | |
function encrypt($plaintext, $key, $iv) { | |
$ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv); | |
return base64_encode($ciphertext); | |
} | |
function decrypt($ciphertext_base64, $key, $iv) { |
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
type ( | |
// BuoyCondition contains information for an individual station. | |
BuoyCondition struct { | |
WindSpeed float64 `bson:"wind_speed_milehour"` | |
WindDirection int `bson:"wind_direction_degnorth"` | |
WindGust float64 `bson:"gust_wind_speed_milehour"` | |
} | |
// BuoyLocation contains the buoy's location. | |
BuoyLocation struct { |
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
package easyget | |
import ( | |
"io" | |
"io/ioutil" | |
"net/http" | |
) | |
// Define Request struct | |
type Request struct { |
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
// (c) 2017 Yami Odymel | |
// This code is licensed under MIT license. | |
package main | |
import ( | |
"fmt" | |
"html" | |
"strconv" | |
) |
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
kind: Ingress | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: redirect-ingress | |
annotations: | |
ingress.kubernetes.io/configuration-snippet: | | |
if ($host ~ ^(.+)\.somedomain\.io$) { | |
return 301 https://$1.domain.io$request_uri; | |
} | |
spec: |
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
#!/usr/local/bin/python | |
# -*- coding: utf-8 -*- | |
def lineNotify(message): | |
payload = {'message':message} | |
return _lineNotify(payload) | |
def notifyFile(filename): | |
file = {'imageFile':open(filename,'rb')} | |
payload = {'message': 'test'} |
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
const { ethers } = require('ethers'); | |
const provider = new ethers.providers.JsonRpcProvider('https://bsc-dataseed.binance.org/'); | |
const BEP20 = { | |
BUSD: '0xe9e7cea3dedca5984780bafc599bd69add087d56', | |
DOP: '0x844fa82f1e54824655470970f7004dd90546bb28', | |
}; | |
const Contract = { | |
router: new ethers.Contract( |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"zipCode": "10100", | |
"subDistrictList": [ | |
{ | |
"subDistrictId": "100801", | |
"districtId": "1008", | |
"provinceId": "10", | |
"subDistrictName": "ป้อมปราบ" |