Skip to content

Instantly share code, notes, and snippets.

Avatar

Louis D. LouWii

View GitHub Profile
@sathoro
sathoro / Controller.php
Last active Jul 17, 2018
Craft CMS plugin example for handling AJAX file uploads
View Controller.php
<?php
namespace Craft;
class Plugin_FileController extends BaseController
{
protected $valid_extensions = array('jpg', 'jpeg', 'png', 'pdf');
protected $assetSourceId = 1;
public function actionUpload()
@joyrexus
joyrexus / README.md
Last active Dec 1, 2020 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods
View README.md

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@leon
leon / nginx.conf
Created Jun 29, 2012
Nginx PHP-FPM Symfony 2 minimal config
View nginx.conf
server {
listen 80;
server_name localhost;
root /home/website/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
You can’t perform that action at this time.