Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

saasfreelancer saas786

🏠
Working from home
Block or report user

Report or block saas786

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@saas786
saas786 / r-debug.php
Created Oct 31, 2019 — forked from Rarst/r-debug.php
R Debug (set of dump helpers for debug)
View r-debug.php
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/
@saas786
saas786 / PortSwitch.php
Created Sep 16, 2019 — forked from bueltge/PortSwitch.php
Port switch to get an workaround to use WordPress Multisite also without the default port 80.
View PortSwitch.php
<?php # -*- coding: utf-8 -*-
declare( strict_types = 1 );
/**
* Plugin Name: Port Switch
* Plugin URI: https://gist.github.com/bueltge/51013ab809f5f0f5e305c70c2d393fff
* Description: Port switch to get an workaround to use WordPress Multisite also without the default port 80.
* Version: dev
* Author: Frank Bültge
* Author URI: https://bueltge.de
* License: MIT
@saas786
saas786 / gist:d83292851c3aedfdd29f76e8c40f9d2a
Created Aug 1, 2019 — forked from scribu/gist:906872
'price' sortable column example
View gist:d83292851c3aedfdd29f76e8c40f9d2a
<?php
// Register the column
function price_column_register( $columns ) {
$columns['price'] = __( 'Price', 'my-plugin' );
return $columns;
}
add_filter( 'manage_edit-post_columns', 'price_column_register' );
@saas786
saas786 / test.html
Created Mar 18, 2019 — forked from srikat/test.html
Dummy Content for Gutenberg
View test.html
<!-- wp:heading -->
<h2>Heading Block (H2)</h2>
<!-- /wp:heading -->
<!-- wp:heading -->
<h3>You are looking at one. (H3)</h3>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>Subhead Block</h2>
View gutenberg-sample-content.html
<!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} -->
<p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":1} -->
<h1>This is a heading (H1)</h1>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>This is a heading (H2)</h2>
@saas786
saas786 / lc-svg-upload.php
Created Sep 8, 2018 — forked from vadyua/lc-svg-upload.php
SVG Media Plugin for WordPress (Works since 4.1.2!)
View lc-svg-upload.php
<?php
/*
Plugin Name: SVG Upload
Plugin URI: http://www.lewiscowles.co.uk
Description: Super PHP Plugin to add Full SVG Media support to WordPress, I should live in {$webroot}/wp-content/plugins/ folder ;)
Author: Lewis Cowles
Version: 1.5.8
Author URI: http://www.lewiscowles.co.uk/
*/
@saas786
saas786 / destructuring.js
Created Apr 4, 2018 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
View destructuring.js
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@saas786
saas786 / PHP - MySql - Dynamic Table Columns
Created Jan 23, 2018 — forked from aa21/PHP - MySql - Dynamic Table Columns
Create table columns on the fly on a mysql db
View PHP - MySql - Dynamic Table Columns
<?php
$conn = mysqli_connect($ht, $ur, $pd);
mysqli_select_db($conn, $db);
//foreach req, check if the column exists, otherwise create it
foreach($_POST as $k => $v){
$key = trim(mysqli_real_escape_string($conn, $k));
@saas786
saas786 / dlAttachments.py
Created Nov 1, 2017 — forked from baali/dlAttachments.py
Python script to download all gmail attachments.
View dlAttachments.py
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'
@saas786
saas786 / gmail.py
Created Nov 1, 2017 — forked from jasonrdsouza/gmail.py
Python script to access a gmail account and download particular emails
View gmail.py
import email, getpass, imaplib, os
detach_dir = '.' # directory where to save attachments (default: current)
user = raw_input("Enter your GMail username:")
pwd = getpass.getpass("Enter your password: ")
# connecting to the gmail imap server
m = imaplib.IMAP4_SSL("imap.gmail.com")
m.login(user,pwd)
m.select("cs2043") # here you a can choose a mail box like INBOX instead
You can’t perform that action at this time.