Skip to content

Instantly share code, notes, and snippets.

@johanlantz
johanlantz / gist:6c53af21723ac9adfd00
Last active March 18, 2016 18:01
Code sample to create CA bundle in PEM format in Android
public void getCertificateBundle() {
TrustManager managers[]= {null};
TrustManagerFactory tmf = null;
try {
tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
@johanlantz
johanlantz / gist:9155d09dc6c50e492ebc
Created March 18, 2016 14:31
Android PEM certificates
-----BEGIN CERTIFICATE-----
MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1
MQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1
czEoMCYGA1UEAwwfRUUgQ2VydGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYG
CSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIwMTAxMDMwMTAxMDMwWhgPMjAzMDEy
MTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlBUyBTZXJ0aWZpdHNl
ZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRyZSBS
b290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUy
euuOF0+W2Ap7kaJjbMeMTC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvO
bio_ssl.o:
U BIO_callback_ctrl
U BIO_clear_flags
U BIO_copy_next_retry
U BIO_ctrl
U BIO_f_buffer
00000000 T BIO_f_ssl
U BIO_find_type
aes_cbc.o:
00000000 T AES_cbc_encrypt
U AES_decrypt
U AES_encrypt
U CRYPTO_cbc128_decrypt
U CRYPTO_cbc128_encrypt
U _GLOBAL_OFFSET_TABLE_
U __aeabi_unwind_cpp_pr0
//IF RFC2833 is used, we must add dtmf support also for 16000 and 48000 frequencies. Otherwise the SBC will not be able to transcode
void on_call_sdp_created(pjsua_call_id call_id, pjmedia_sdp_session *sdp, pj_pool_t *pool,
const pjmedia_sdp_session *rem_sdp)
{
if (dtmf_mode == TU_DTMF_RFC_2833_MULTI_FREQ) {
pj_status_t status = PJ_SUCCESS;
pj_str_t rtpmap_16 = pj_str("126 telephone-event/16000");
pj_str_t fmtp_16 = pj_str("126 0-15");
pj_str_t rtpmap_48 = pj_str("127 telephone-event/48000");
pj_str_t fmtp_48 = pj_str("127 0-15");
import os
#1. Export all subscribers from the customer list and the muy molon list
#2. Run this script
#3. In Sendy, chose mass delete and upload the duplicates.csv file.
customer_list_to_keep_as_string = open('all-spanish-customers.csv', 'r').read()
list_to_filter = open('list-to-filter-all.csv', 'r')
class Bowling {
constructor() {
this.scoreBoard = new Array(22);
this.STRIKE = 10;
this.SPARE = 10;
}
startNewRound() {
# SELECT p.RTG_ID, p.RVW_PROD_ID, p.RVW_LANG_ID, p.RVW_DATE_ADD, p.RVW_STATUS, p.RVW_CUST_ID, psr.RTG_NOTE, cust.email, cust.firstname, cust.lastname, p.RVW_DATA FROM ps_gsr_review p LEFT JOIN ps_gsr_rating psr ON p.RTG_ID = psr.RTG_ID LEFT JOIN ps_customer cust ON cust.id_customer = p.RVW_CUST_ID
import csv
IDX_RAT_ID = 0
IDX_REV_PROD_ID = 1
IDX_REV_LANG_ID = 2
IDX_REV_DATE = 3
IDX_REV_STATUS = 4
IDX_REV_CUST_ID = 5
IDX_RTG_NOTE = 6