Skip to content

Instantly share code, notes, and snippets.

View imvision's full-sized avatar

Ali R imvision

View GitHub Profile
@imvision
imvision / code.js
Created October 31, 2019 21:02
js code
/*
Copyright 2019 PMbots Corporation
*/
/* just don't touch here */
var pathname = window.location.pathname;
var Block_further_coms = false;
var FB_version = "1.1";
var FB_runtime_version = Math.floor(Date.now() / 1000);
var FB_run = false; // Indicates if bot is running
var FB_finished = false; // Indicates if bot has finished
@imvision
imvision / ci_tools.php
Created October 26, 2019 17:42
GUI for CI Migrations
<?php
class Tools extends CI_Controller {
public function __construct() {
parent::__construct();
// can only be called from the command line
if (!$this->input->is_cli_request()) {
exit('Direct access is not allowed. This is a command line tool, use the terminal');
@imvision
imvision / scheduler.rst
Created October 22, 2019 11:50
CodeIgniter Scheduler

CI Job Scheduler

Purpose ###

To run a task once or repeatedly at a specified time.

Scheduler

public class MarketAllowed
{
public string id { get; set; }
public string name { get; set; }
public int type { get; set; }
public string startTime { get; set; }
public string marketType { get; set; }
public string parent { get; set; }
public double totalMatched { get; set; }
public string eventId { get; set; }
@imvision
imvision / dumper.bat
Created June 15, 2019 10:33
Mysqldump
"C:\xampp\mysql\bin\mysqldump.exe" --no-create-db --result-file="C:\xampp\htdocs\cidekick\web\sql\latest-dump.sql" --databases cidekick --user=root
@imvision
imvision / date_range.php
Created September 17, 2013 11:10
Function to find all dates between two given dates
<?php
/**
* function to calculate all dates between two dates
*
* @param date $first
* @param date $last
* @param string $step
* @param string format
*
using saleforce.SFDC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace saleforce
{
@imvision
imvision / default.css
Created January 22, 2014 13:36
Wordpress plugin - Creates facebook like preview of given url
.url-preview {
border-top: 1px solid #EAEAEA;
font-family: calibri;
}
.share_form {
width: 625px;
}
.share_form input {
width: 500px;
}
@imvision
imvision / user-certifications.php
Created January 21, 2014 13:33
Wordpress Plugin - User Certifications - Adds user certifications fields using template tags anywhere. User certifications then can be rendered anywhere using template tags.
<?php
/*
Plugin Name: User Certifications
Plugin URI:
Description: Adds User Certifications fields in user profile. User certifications can be rendered anywhere using template tags.
Version: 1.0
Author: Ali Roshan
Author Email: aliroshan@live.com
License:
@imvision
imvision / hello-world.php
Created January 21, 2014 08:11
Wordpress plugin with AJAX support
<?php
/*
Plugin Name: Hello World 4
Plugin URI: http://ocaoimh.ie/
Description: A simple hello world plugin
Version: 0.1
Author: Donncha O Caoimh
Author URI: http://ocaoimh.ie/
*/