Instantly share code, notes, and snippets.

View ImapService.php
<?php
namespace App\Services;
class ImapService {
protected $imapHost;
protected $imapEmail;
protected $imapPassword;
protected $searchCriteria;
View dbcopier.py
#!/usr/bin/env python
import ConfigParser
import os
import time
import getpass
def combine_files(self,file1,file2):
with open('file1', 'w') as outfile:
with open(file2) as infile:
View pydump.py
#!/usr/bin/env python
import ConfigParser
import os
import time
import getpass
def get_dump():
print "Enter user:"
user = raw_input()
View backeruper.py
import os, sys
import math
import boto
import string
import shutil
from os import path
from os import stat
from array import *
from time import gmtime, strftime
from boto.s3.key import Key
View deployer5000.py
import git
import string
import os
from os import path
from git import *
from subprocess import call
class gitConnect():
def deploy(self):
View PDOService.php
<?php
namespace App\Services;
class PDOService {
private $connection;
public function __construct($connection) {
$this->connection = $connection;
View imageColor.js
<script type="text/javascript" language="javascript">
var img = document.getElementById("myImage");
img.addEventListener("click", function(event) {
var canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
canvas.getContext('2d').drawImage(img, 0, 0, img.width, img.height);
var p = canvas.getContext('2d').getImageData(event.offsetX, event.offsetY, 1, 1).data;
var hex = "#" + ("000000" + rgbToHex(p[0], p[1], p[2])).slice(-6);
View Hosts.py
import os
import datetime
import re
import socket
import struct
import uuid
def normalize_ipv4(ip):
try:
View CloudFlareApiClient.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using Newtonsoft.Json;
namespace CloudFlareApiClient
{
class Program
{
View config\config.php
<?php
DEFINE('_MINECRAFT_SERVER_DIRECTORY_','C:\Minecraft Server Files');