This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private $historyLimit=500; | |
public function postSave() | |
{ | |
if (isset($this->historyLimit) && $this->revisionHistory()->count() >= $this->historyLimit){ | |
$LimitReached=true; | |
}else{ | |
parent::postSave(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blade::extend(function($view, $compiler) { | |
$pattern = $compiler->createOpenMatcher('oneLine'); | |
$page="Default"; | |
if (preg_match_all($pattern, $view,$result)){ | |
foreach($result[2] as $match){ | |
$param = trim(trim($match, '(\'\')')); | |
$page = View::make($param)->render(); | |
$page = implode(" ", explode("\n", $page)); | |
$view = preg_replace($pattern, $page, $view); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$char_count=0; | |
//Number To British English | |
function num2brit($number) | |
{ | |
$n2t = new NumberFormatter("en", NumberFormatter::SPELLOUT); | |
$out = ""; | |
//Thousands |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<openerp> | |
<data> | |
<template id="theme_epona_layout" inherit_id="website.layout"> | |
<xpath expr="//div[@id='wrapwrap']/header" position="replace"> | |
<header> | |
<div class="navbar navbar-default navbar-static-top"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-top-collapse"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################ | |
# Script for Installation: ODOO Saas4/Trunk server on Ubuntu 14.04 LTS | |
# Author: André Schenkels, ICTSTUDIO 2014 | |
# Updated by: Will Gaudette, CMIT 14MAR15 | |
#------------------------------------------------------------------------------- | |
# | |
# This script will install ODOO Server and a reverse Nginx proxy on a | |
# clean Ubuntu 14.04 Server | |
#------------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Net::VNC; | |
use TryCatch; | |
$|=true; | |
open(SERVERS , "results.csv"); | |
while(<SERVERS>) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// your facebook credentials | |
$username = "FACEBOOK_USERNAME_OR_PHONE_NUMBER"; | |
$password = "FACEBOOK_PASSWORD"; | |
// login to facebook | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://m.facebook.com/login.php'); | |
curl_setopt($ch, CURLOPT_POSTFIELDS,'charset_test=€,´,€,´,水,Д,Є&email='.urlencode($username).'&pass='.urlencode($password).'&login=Login'); | |
curl_setopt($ch, CURLOPT_POST, 1); |
NewerOlder