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 python | |
""" | |
Collects stats about pgbouncer client and postgres server connections | |
If psycopg2 is available it will use it instead of psql and will | |
query pgbouncer both for client and postgres server connections. | |
test out using: | |
/opt/netdata/usr/libexec/netdata/plugins.d/python.d.plugin 1 debug trace pgbouncer |
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
import 'dart:convert'; | |
import 'dart:typed_data'; | |
import "package:pointycastle/export.dart"; | |
import "./convert_helper.dart"; | |
// AES key size | |
const KEY_SIZE = 32; // 32 byte key for AES-256 | |
const ITERATION_COUNT = 1000; |
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
<?php | |
// prepare headers for API call | |
$request_headers = array(); | |
// prepare the url of the api I am calling | |
$api_url = "http://api.example.com?parameters=whatever"; | |
// append streamdata sandbox proxy | |
$url = 'https://streamdata.motwin.net/' . $api_url; |
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
public void setSelfSignedSSL(Context mContext, @Nullable String instanceName){ | |
try { | |
CertificateFactory cf = CertificateFactory.getInstance("X.509"); | |
// cert file stored in \app\src\main\assets | |
InputStream caInput = new BufferedInputStream(mContext.getAssets().open("certificate.cer")); | |
Certificate ca = cf.generateCertificate(caInput); | |
caInput.close(); |
Disqus decided to introduce some bs affiliate links (via https://disq.us/url → https://redirect.viglink.com). uBlock blocks this, so you won’t ever get to where you want to go.
If you log in with a Disqus account, you may also be turn it off.
When you’re at the “Page Not Found” screen, just click on this bookmarklet to continue to the actual link target.
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
<?php | |
$examples = [ | |
// kendaraan umum | |
'B 1', | |
'B 1234 ABC', | |
'B-1234-ABC', | |
'AD-1234 - XYZ', | |
'AB1234LD', | |
'D1', |
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
/* | |
* Genarate rsa keys. | |
*/ | |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" |
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
<?php | |
/** | |
* JSON data to html table | |
* | |
* @param object $data | |
* | |
*/ | |
function jsonToTable ($data) | |
{ |
NewerOlder