- Create
UNLOGGED
table. This reduces the amount of data written to persistent storage by up to 2x. - Set
WITH (autovacuum_enabled=false)
on the table. This saves CPU time and IO bandwidth on useless vacuuming of the table (since we neverDELETE
orUPDATE
the table). - Insert rows with
COPY FROM STDIN
. This is the fastest possible approach to insert rows into table. - Minimize the number of indexes in the table, since they slow down inserts. Usually an index
on
time timestamp with time zone
is enough. - Add
synchronous_commit = off
topostgresql.conf
. - Use table inheritance for fast removal of old data:
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
<form class="form-horizontal frm--ver-cnp" id="frmConfirmEmail"> | |
<input autocomplete="false" name="hidden" type="text" style="display:none;"> | |
<div id="frmErrorMsg" class="alert alert-danger text-left collapse" role="alert" style="display: none;"><span></span></div> | |
<div class="form-group row"> | |
<div class="col-sm-12"> | |
<input type="text" class="passInput" name="inputpin[]" maxlength="1" size="1" autocomplete="new-password" min="0" max="9" required="" pattern="\d{1}" autofocus=""> | |
<input type="text" class="passInput" name="inputpin[]" maxlength="1" size="1" autocomplete="new-password" min="0" max="9" required="" pattern="\d{1}"> | |
<input type="text" class="passInput" name="inputpin[]" maxlength="1" size="1" autocomplete="new-password" min="0" max="9" required="" pattern="\d{1}"> | |
<input type="text" class="passInput" name="inputpin[]" maxlength="1" size="1" autocomplete="new-password" min="0" max="9" required="" pattern="\d{1}"> | |
<input type="text" class=" |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Project Title</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> |
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 | |
setlocale(LC_CTYPE, 'de_DE.UTF8'); | |
function myUpper($char){ | |
$lo = ord($char); | |
$up = $lo & 0x5f; | |
return $up; | |
} | |
function myLower($char){ | |
$up = ord($char); | |
$lo = $up ^ 0x20; |
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
start .\chrome.exe --disable-web-security --ignore-certificate-errors --user-data-dir="D:/Chrome" | |
exit |
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 | |
$opt = array( | |
"--zoom"=>'1', | |
"--disable-smart-shrinking"=>'', | |
"--page-size"=>'A4', | |
"--orientation"=>'Landscape', | |
"--margin-bottom"=>'0', | |
"--margin-top"=>'0', | |
"--margin-left"=>'0', | |
"--margin-right"=>'0' |
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
301 moved permanently (redirect): | |
<?php | |
header('HTTP/1.1 301 Moved Permanently'); | |
header('Location: http://www.example.com'); | |
die(); | |
?> | |
302 moved temporarily(redirect): | |
<?php | |
header('Location: http://www.example.com'); |
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
(function(x, f=()=>x){ | |
var x; | |
var y=x; | |
x=2; | |
return [x,y,f()]; | |
})(1) | |
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
function myfunc(){ | |
var data = { | |
name:'', | |
age:0, | |
roles:[], | |
prefs:{ | |
timezone:1, | |
theme:'light', | |
lng:'en' | |
} |
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 | |
/** Encryption setup CODE **/ | |
$key = openssl_pkey_new(array('private_key_bits' => 2048)); | |
$private_key = openssl_pkey_get_details($key); | |
$public_key = $private_key['key']; | |
echo "<pre>"; | |
print_r($private_key); | |
echo "</pre>"; |