View wizard.php
$dbname=’db’; //your database name
$username=’userrname’; // your database user name
$password=’password’; //your database user password
$db = mysql_connect($dbname,$username,$password);
if (!$db) {
echo "Cannot connect to the database – incorrect details";
} else {
mysql_select_db(‘pm’);
$result = mysql_query(‘show tables’);
View dabblet.css
#right{
background:
url(ttp://i66.tinypic.com/1jm0d4.jpg)
100% 0%/50% 50% no-repeat,
url(https://i.imgur.com/ydkMYeK.jpg)
0% 0%/100% 100% no-repeat;
position:fixed;
top:0%;
right:3%;
width:48%;
View function.php
// connect and login to FTP server
$ftp_server = "ftp.domain.com";
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
//$ftp_conn = ftp_ssl_connect($ftp_server);// for SSL-FTP connection instead of ftp_connect
$login = ftp_login($ftp_conn, $ftp_username, $ftp_userpass);
$file = "local-file.jpg";
// upload file
if (ftp_put($ftp_conn, "server-file.jpg", $file, FTP_ASCII)) {
View activity.pjp
<?php
define("BLARG", "1");
require __DIR__ . '/../lib/common.php';
if($_GET['id'])
$u = (int)$_GET['id'];
else if($_GET['u'])
$u = (int)$_GET['u'];
else {
if(!$loguserid) die('No user specified! Please either specify a user, or log onto the board.');
View gist:6037ccddb35e9181bb17524c524364ad
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
addusertogroup
View PushNotifications.php
//$vHost = 'gateway.sandbox.push.apple.com';
$vHost = 'gateway.push.apple.com';
$vPort = 2195;
$vCert = APPPATH.'../assets/certificates/Certificates-Production.pem';
$vPassphrase = 'password to your pem file';
$vToken = $data['token'];
$vAlert = array(
View test.html
<script>location='https://www.paypalobjects.com/en_US/vhelp/v4/vps/reg/whskin_tw.htm#javascript:alert(document.domain)'</script>
View twins.php
function Twins($a, $b) {
$flag = false;
$a_len = count($a);
$b_len = count($b);
if($a_len != $b_len) {
throw new Exception('array index count mismatched!');
}
$result = [];
for($i = 0; $i<$a_len; $i++) {
View module1-commonjs-import.js
var module1 = require('module1');
var module1Instance = new module1();
myModuleInstance.hello(); // 'hello!'
myModuleInstance.world(); // 'world!'
View sortfilesintofolders.sh
# https://unix.stackexchange.com/questions/291732/sort-files-into-folders-depending-on-filetype
#!/bin/bash
set -e
set -u
set -o pipefail
start=$SECONDS
exts=$(ls -p | grep -v / | sed 's/^.*\.//' | sort -u) # not folders