Skip to content

Instantly share code, notes, and snippets.

View ammarfaizi2's full-sized avatar
๐Ÿ€
Baby Opossum Posse

Ammar Faizi ammarfaizi2

๐Ÿ€
Baby Opossum Posse
View GitHub Profile
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <http://docs.phpmyadmin.net/>.
*
* @package PhpMyAdmin
<?php
require_once("config2.php");
if(isset($_POST['Register'])){
// filter data yang diinputkan
$cnama = filter_input(INPUT_POST, 'cnama', FILTER_SANITIZE_STRING);
$cuser = filter_input(INPUT_POST, 'cuser', FILTER_SANITIZE_STRING);
// enkripsi password
<?php
$a =
"Hi there! My nickname is atb00ker. Today, 24-11-18 I learnt to use regular expressions!
Hi there! My nickname is Ajay. Today, 23-1-19 I learnt to use regular expressions!
Hello, i am Ajay
This is any other string.";
preg_match_all("/My nickname is [a-zA-Z0-9]*\. Today, \d{1,2}\-\d{1,2}\-\d{1,2} I learnt to use regular expressions!/Usi", $a, $m);
var_dump($m);
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
;opcache.interned_strings_buffer=8
;opcache.max_accelerated_files=10000
;opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=0
;opcache.revalidate_freq=2
@ammarfaizi2
ammarfaizi2 / q.cpp
Last active December 18, 2018 15:57
#include <cstdio>
#include <stdlib.h>
int
main(int argc, char const *argv[])
{
int q, i, j, w, x, y, z;
FILE *h = fopen("/tmp/input.txt", "r");
char *r9 = (char*)malloc(32 * sizeof(char));
<?php
namespace App\Imports;
use App\Siswa;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class SiswaImport implements ToCollection, WithHeadingRow
<?php
$ch = curl_init("http://referensi.data.kemdikbud.go.id/tabs.php?npsn=69964524");
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true]);
$a = curl_exec($ch) xor curl_close($ch) xor $e = "explode";
$e = $e("</table>", $e("<div id=\"tabs\">", $a, 2)[1], 2)[0];
preg_match_all("/<tr>.+<td>.+<\/td>.+<td>(.+)<\/td>.+<td>:<\/td>.+<td>(.+)<\/td>.+<\/tr>/Usi", $e, $m);
$m[2][0] = strip_tags($m[2][0]);
$m = array_combine($m[1], $m[2]);
array_walk($m, function (&$m) {
$m = trim($m);
<?php
header("Content-Type: application/json");
if ((!isset($_GET["nisn"])) || (!is_string($_GET["nisn"]))) {
http_response_code(400);
print json_encode(["status" => "invalid_argument"]);
exit;
}
if (
<?php
$no = 1;
// $oci = "170.79.16.19:8080";
// test die proxy
$oci = "111:111:111:111:123";
$url = "https://mycoins.global/?friend/63025970027154";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
<?php
require __DIR__."/src/ZippyShare/ZippyShare.php";
$st = new ZippyShare\ZippyShare("https://www28.zippyshare.com/v/T1mUR2Eq/file.html");
is_dir(__DIR__."/test") or mkdir(__DIR__."/test");
$st->outFile(__DIR__."/test/test.mp4");
$st->exec();