Skip to content

Instantly share code, notes, and snippets.

View bamsarts's full-sized avatar
🚴‍♀️
on riding

Bambang Supriadi bamsarts

🚴‍♀️
on riding
View GitHub Profile
@bamsarts
bamsarts / php
Last active March 9, 2020 06:05
curl post
$username = $this->input->post('username',TRUE);
$password = $this->input->post('password',TRUE);
$postData = "contact=" . $username . "&password=" . $password;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->base_url."/auth/signinForsa");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
@bamsarts
bamsarts / decryptme.py
Created September 24, 2018 06:40
soal DecryptME
from base64 import *
def enkripsi(plain, text)
enc = []
plain = b64encode(plain)
for i, l in enumerate(plain):
kunci = ord(keys[i % len(keys)])
teks = ord(l)
enc.append(chr((teks + kunci) % 127))
return ''.join(enc)
@bamsarts
bamsarts / gist:3412d70ba282ded27791
Created June 6, 2015 03:36
how to add sorting ascending in function display_all ?
//***************************************************************
// HEADER FILE USED IN PROJECT
//****************************************************************
#include<iostream>
#include<fstream>
#include<cctype>
#include<iomanip>
#include<stdlib.h>
using namespace std;