sudo spctl --master-enable
sudo spctl --master-disable
// ------------------------------------------ | |
// converts a string with a stret address | |
// into a couple of lat, long coordinates. | |
// ------------------------------------------ | |
public function getLatLong($address){ | |
if (!is_string($address))die("All Addresses must be passed as a string"); | |
$_url = sprintf('http://maps.google.com/maps?output=js&q=%s',rawurlencode($address)); | |
$_result = false; | |
if($_result = file_get_contents($_url)) { | |
if(strpos($_result,'errortips') > 1 || strpos($_result,'Did you mean:') !== false) return false; |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Zeus</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
# check a list for float type value | |
def checkListFloat(self, arList, isfloat = False) : | |
result = [] | |
for _i in arList: | |
if self.checkFLoat(_i) : | |
result.append([int(float(_i))]) | |
else : | |
res = re.sub('[^\d\.,]', '', _i) | |
if res : | |
result.append([res]) |
# running tabula | |
def tabula(jarfile, coordinate, pathFile) : | |
output = self.launchWithoutConsole('java', ['-jar', str(jarfile), '-p', 'all', '-a', str(coordinate), str(pathFile)]) | |
return output | |
# Subprocess without console (PyInstaller) | |
def launchWithoutConsole(command, args): |
curl -s http://data.iana.org/TLD/tlds-alpha-by-domain.txt | tail -n+2 | wc -L |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Testing Char</title> | |
<style type="text/css"> | |
@import url(https://fonts.googleapis.com/css?family=Roboto); | |
body { | |
font-family: 'Roboto'; | |
font-size: 18px; padding: 5px; | |
} |
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Print External Link</title> | |
<script type="text/javascript"> | |
function closePrint () { | |
document.body.removeChild(this.__container__); | |
} |
<?php | |
/* Function: download with resume/speed/stream options */ | |
/* | |
* Parametrs: downloadFile(File Location, File Name, | |
* max speed, is streaming | |
* If streaming - movies will show as movies, images as images | |
* instead of download prompt | |
*/ | |
function downloadFile($fileLocation, $fileName, $maxSpeed = 13, $doStream = false) |