Skip to content

Instantly share code, notes, and snippets.

View phpfour's full-sized avatar

Mohammad Emran phpfour

View GitHub Profile
<?php
class ActivitiService{
const BASE_URL = 'http://localhost:8080/activiti-rest/service/';
const ADMIN_USERNAME = 'kermit';
private $_services = array(
'processDefinitions' => 'process-definitions',
'processDefinition' => 'process-definition/',
#!/bin/bash
sudo apt-get remove phantomjs
sudo unlink /usr/local/bin/phantomjs
sudo unlink /usr/local/share/phantomjs
sudo unlink /usr/bin/phantomjs
sudo apt-get install fontconfig
sudo su -
# stuff we need to build from source
apt-get install libpcre3-dev build-essential libssl-dev libssl0.9.8 zlib1g lsb-base
# get the nginx source
cd /opt/
wget http://nginx.org/download/nginx-1.4.4.tar.gz
tar -zxvf nginx*
backend default {
.host = "127.0.0.1";
.port = "80";
}
sub vcl_recv {
if (req.http.Cache-Control ~ "no-cache") {
return (pass);
}

New computer setup

  • a/o 2015-05-27 *

Format the drive

  1. Restart with cmd-R or cmd-D
  2. Erase drive / 3x if second-handk
  3. Reinstall MacOS
@phpfour
phpfour / default.vcl
Created January 15, 2016 03:37 — forked from reifman/default.vcl
Example Varnish VCL Configuration e.g. /etc/varnish/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}
@phpfour
phpfour / macosx-install-php-oracle-oci8.md
Last active January 8, 2017 11:45 — forked from gido/macosx-install-php-oracle-oci8.md
install Oracle PHP Extension (oracle OCI8) - instantclient for Mac OS 10.8
@phpfour
phpfour / OracleDoctrineTypeMappingListener.php
Created January 23, 2016 02:41 — forked from johnkary/OracleDoctrineTypeMappingListener.php
Connecting to Oracle with Symfony2 and Doctrine 2. 1. Map Oracle's DATE type to Doctrine's "date" type instead of "datetime" for Oracle driver. 2. Properly configures Doctrine to use most common Oracle Date and DateTime environment configurations. You may or may not need this. Check your Oracle server configuration and see \Doctrine\DBAL\Event\L…
<?php
namespace Acme\PeopleSoftBundle\Listener;
use Doctrine\DBAL\Event\ConnectionEventArgs;
use Doctrine\DBAL\Events;
use Doctrine\Common\EventSubscriber;
/**
* Changes Doctrine's default Oracle-specific column type mapping to Doctrine
@phpfour
phpfour / news-feed-image-blur.css
Last active July 23, 2020 20:41 — forked from arafathusayn/news-feed-image-blur.css
Facebook Image Blur and Clear on Hover in News Feed (by ArafatHusayn)
/*
# Install from the link:
https://userstyles.org/styles/139786/facebook-photo-blur-in-news-feed
*/
@-moz-document domain("www.facebook.com"), domain("web.facebook.com") {
div[id*="feed_stream"] a[target="_blank"] img,
div[id*="feed_stream"] a[href*="photo"] img,
@phpfour
phpfour / a-new-mac-setup.md
Created June 25, 2017 18:08 — forked from maxfenton/a-new-mac-setup.md
System setup stuff for a new mac

New computer setup

  • a/o 2016-05-21 *

--

Format the drive

  1. Restart with Cmd-R or Cmd-D
  2. Erase drive / 3x if second-hand
  3. Reinstall MacOS