Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View netman92's full-sized avatar

Stanislav Komanec netman92

View GitHub Profile
@jBenes
jBenes / ng-fb-adapter.js
Created October 12, 2014 19:41
ng-fb-adapter - usage
angular.module('myModule', [
'facebook-integration'
])
.config(function(..., fbAdapterProvider) {
var adapter = 'OpenFBAdapter';
if(window.cordova) {
adapter = 'facebookConnectPluginAdapter';
}
@plentz
plentz / nginx.conf
Last active April 22, 2024 10:54
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@webjay
webjay / gh_hook.php
Last active January 7, 2023 11:54
Php hook script that can git pull, apc_clear_cache() etc
<?php
ignore_user_abort(true);
function syscall ($cmd, $cwd) {
$descriptorspec = array(
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to
2 => array('pipe', 'w') // stderr
@rjz
rjz / cs-jq-plugin-template.coffee
Created September 3, 2012 17:01
Coffeescript jQuery Plugin Class Template
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->
@Ibmurai
Ibmurai / php-log-highlight.php
Created April 27, 2012 11:08
PHP apache error log highlighter
#!/usr/bin/php
<?php
/**
* Usage: tail -f /var/log/apache2/error.log | php-log-highlight
*/
ini_set('display_errors', E_ALL & ~E_STRICT);
// Dependencies
require_once 'Console/Color.php';
@phpdude
phpdude / nginx.conf
Last active February 28, 2024 04:36
Nginx image filter + caching of results.
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
@zefer
zefer / Install_nginx_from_src_with_module.sh
Created February 16, 2011 12:26
Compile nginx from source, include the Headers More module - Ubuntu
sudo su -
# stuff we need to build from source
apt-get install libpcre3-dev build-essential libssl-dev
# get the nginx source
cd /opt/
wget http://nginx.org/download/nginx-0.8.54.tar.gz
tar -zxvf nginx*
# we'll put the source for nginx modules in here