Skip to content

Instantly share code, notes, and snippets.

@pipiscrew
pipiscrew / generate_poco_classes_by_mysql_table.sql
Created July 25, 2025 05:48
Generate c# POCO classes from MYSQL table
--src - https://gist.github.com/anirugu/9fb82ce773c45578f42f7a6d899f3221
set @schema := 'schema_name';
set @table := 'table_name';
SET group_concat_max_len = 2048;
SELECT
concat('public class ', @table, '\n{\n', GROUP_CONCAT(a.property_ SEPARATOR '\n'), '\n}') class_
FROM
(select
CONCAT(
'\tpublic ',
@pipiscrew
pipiscrew / generate_poco_classes_by_mssql_dbase.sql
Last active July 25, 2025 05:49
Generate c# POCO classes from SQL Server database
--fixed version of
--SOURCE : https://gist.github.com/joey-qc/6710702?permalink_comment_id=5345514#gistcomment-5345514
--* PRIMARY KEY appears double/triple/tenple
--* FOREIGN KEY removed (useless)
DECLARE @tableName varchar(200)
DECLARE @columnName varchar(200)
DECLARE @nullable varchar(50)
DECLARE @datatype varchar(50)
DECLARE @maxlen int
@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 / 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 / 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 / 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);