Skip to content

Instantly share code, notes, and snippets.

@pipiscrew
pipiscrew / google-translate.html
Created May 27, 2018 19:02
plain google translate for plain or wordpress use
<!--
for wordpress edit the single.php and the following code
Added the 20 famous languages as described at :
http://mentalfloss.com/article/67766/worlds-top-20-languages-and-words-english-has-borrowed-them -->
<select id="tcombo" style='float:right;font-size:small;' onchange='if (document.getElementById("tcombo").value == 0) return; window.open("https://translate.google.com/translate?sl=auto&tl=" + document.getElementById("tcombo").value + "&u=" + location.href)'>
<option value=0>-translate-</option>
<option value="ar">Arabic</option>
<option value="bn">Bengali</option>
@pipiscrew
pipiscrew / recaptcha.html
Created October 18, 2017 17:36
Recaptcha Landing Page Demo - Avoid Bots
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0;">
<title>Recaptcha Landing Page Demo - Avoid Bots</title>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script>
var validate = function(gResponse){
jQuery.ajax({
url: '/recaptcha/',
@pipiscrew
pipiscrew / index.php
Last active March 11, 2017 19:09
WordPress - Insert Post to wordpress from your PHP custom application. Login form supported
<?php
@session_start();
require_once('../wp-load.php');
//when form submited
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
@pipiscrew
pipiscrew / config.php
Last active March 5, 2017 15:12
Login Form with Login Atempts and 1day expiration cookie
<?php
/**
* @link https://pipiscrew.com
* @copyright Copyright (c) 2016 PipisCrew
*/
function connect_mysql() {
$mysql_hostname = "localhost";
$mysql_user = "";
@pipiscrew
pipiscrew / config_pdo.php
Last active February 6, 2017 18:38
PDO Custom Class
<?php
function connect_mysql() {
$mysql_hostname = "localhost";
$mysql_user = "x";
$mysql_password = "x";
$mysql_database = "x";
$dbh = new PDO("mysql:host=$mysql_hostname;dbname=$mysql_database", $mysql_user, $mysql_password,
array(
@pipiscrew
pipiscrew / FirebaseCustomLoginRESTAPI.cs
Last active October 22, 2016 10:35
[CSharp] Firebase *Custom Login* via REST API
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
namespace FBDesktop
{
@pipiscrew
pipiscrew / General.cs
Last active October 14, 2016 17:57
C# dbase connections
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Windows.Forms;
namespace PipisCrew.Helpers
{
@pipiscrew
pipiscrew / permissions.txt
Created October 5, 2016 19:14 — forked from Arinerron/permissions.txt
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
@pipiscrew
pipiscrew / webssql.htm
Created May 10, 2016 19:54 — forked from andyj/webssql.htm
Look at the basics of WebSQL
<html>
<head>
<title>Look at WebSQL</title>
<script>
// Through the code below remember essentialy there are just 3 core methods we tend to use
// openDatabase
// transaction
// executeSql
// Opening a connection
@pipiscrew
pipiscrew / json_decode_by_PHP_array.java
Created April 12, 2016 18:54
json decode by PHP array
////////////////// PHP
//get_multi_recordset.php
$brands = getSet($db, "select brand_id from brands where user_id=?", array($user_id));
$categories = getSet($db, "select category_id from categories where user_id=?", array($user_id));
$subcategories = getSet($db, "select subcategory_id from subcategories where user_id=?", array($user_id));
$payments = getSet($db, "select payment_id from payments where user_id=?", array($user_id));
$json = array('brands'=> $brands, 'categories' => $categories, 'subcategories' => $subcategories, 'payments' => $payments);
header("Content-Type: application/json", true);