Skip to content

Instantly share code, notes, and snippets.

Avatar
💻

Mladen Milicevic jomlamladen

💻
  • Digital Bridges
  • Serbia
View GitHub Profile
@dtomasi
dtomasi / default
Last active Oct 21, 2022
Brew Nginx PHP7
View default
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@kottenator
kottenator / simple-pagination.js
Created Jul 13, 2015
Simple pagination algorithm
View simple-pagination.js
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@leandrocp
leandrocp / Brocfile
Created Nov 6, 2014
Deploy ember-cli app on nginx
View Brocfile
/* global require, module */
// Prepend app name on assets names
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
fingerprint: {
enabled: true,
prepend: '/appX/'