Skip to content

Instantly share code, notes, and snippets.

View JasvinderSingh1's full-sized avatar
🤘

Jasvinder Singh JasvinderSingh1

🤘
  • Lucknow, India
View GitHub Profile
<?php
// Copyright (C) 2009-2016 pdfcrowd.com
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
<?php
define("API2PDF_BASE_ENDPOINT", 'https://v2018.api2pdf.com');
define("API2PDF_MERGE", API2PDF_BASE_ENDPOINT.'/merge');
define("API2PDF_WKHTMLTOPDF_HTML", API2PDF_BASE_ENDPOINT.'/wkhtmltopdf/html');
define("API2PDF_WKHTMLTOPDF_URL", API2PDF_BASE_ENDPOINT.'/wkhtmltopdf/url');
define("API2PDF_CHROME_HTML", API2PDF_BASE_ENDPOINT.'/chrome/html');
define("API2PDF_CHROME_URL", API2PDF_BASE_ENDPOINT.'/chrome/url');
define("API2PDF_LIBREOFFICE_CONVERT", API2PDF_BASE_ENDPOINT.'/libreoffice/convert');
https://scottbolinger.com/ionic-wordpress-app/
https://www.google.com/search?q=how+does+companies+know+if+a+doamin+is+purchaesed&rlz=1C1CHBD_enIN736IN737&oq=how+does+companies+know+if+a+doamin+is+purchaesed&aqs=chrome..69i57j33.14238j0j7&sourceid=chrome&ie=UTF-8
https://wordpress.stackexchange.com/questions/123298/term-begins-with-a-letter
https://www.quora.com/How-do-those-external-companies-know-I-bought-a-domain
@JasvinderSingh1
JasvinderSingh1 / custom options page
Created November 20, 2018 11:53
custom options page
<?php
/*
* Start::Front Page Options
*/
add_action( 'admin_enqueue_scripts', 'consultant_include_myuploadscript' );
function consultant_include_myuploadscript() {
if ( ! did_action( 'wp_enqueue_media' ) ) {
wp_enqueue_media();
@JasvinderSingh1
JasvinderSingh1 / TYPO3
Created November 1, 2018 08:20
useful info
// reference for TYPO3
https://usetypo3.com
// i am getting blank screen on backend in typo3
To see what kind of an error produced the blank page it is very useful to alter your /typo3/typo3conf/localconf.php by adding
$TYPO3_CONF_VARS['SYS']['displayErrors'] = '1';
PDF invoice in aimeos typo3 shop
https://aimeos.org/help/help-f15/generating-a-pdf-invoice-t1036.html
@JasvinderSingh1
JasvinderSingh1 / dump.php
Created November 1, 2018 08:15
Database export using script
<?php
$host = "localhost";
$user = "odscinc.com";
$pwd = "0d5c1nc!!2014";
$db = "odscinc_com";
$mysqlUserName = "odscinc.com";
$mysqlPassword = "0d5c1nc!!2014";
$mysqlHostName = "localhost";
$DbName = "odscinc_com";
//https://stackoverflow.com/questions/18480105/how-to-show-multiple-areas-by-location-in-google-maps-using-php
var map;
var geocoder;
var marker;
var people = new Array();
var latlng;
var infowindow;
$(document).ready(function() {
How to redirect http://domain.com to https://www.domain.com?
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
*********************
<?php
// in this file we wil define all generic functins
// This is to display data from table
function get_table_data($tbl, $where='', $order='', $limit='')
{
global $conn;
$sql = "select * from $tbl";
if(!empty($where))
{
$sql .= " where $where";
<?php
class functions
{
function token_generate($length = 10)
{
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++)
{