This file contains 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
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Config Github Settings | |
github_username = "fideloper" | |
github_repo = "Vaprobash" | |
github_branch = "1.1.0" | |
github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}" | |
# Server Configuration |
This file contains 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 | |
namespace SDPHP\PhotoOpBundle\Controller; | |
use GuzzleHttp\Client; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
class DefaultController extends Controller | |
{ |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Custom Vagrantfile for LAMP development | |
# Taken from http://fideloper.github.io/Vaprobash/ | |
# | |
# Modification: | |
# 1) Set custom path to synced_folder, defaults to '.'. | |
# 2) Add custom vhost. Simply add 'host' and 'docroot' to vhost hash. | |
# Other values are currently ignored. |
This file contains 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
package main | |
/** | |
* Word permutations using Heap's algorithm | |
* http://en.wikipedia.org/wiki/Heap%27s_algorithm | |
*/ | |
import ( | |
"fmt" | |
"strings" | |
"bytes" | |
) |
This file contains 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
/** | |
* Problem: Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0. | |
* Not a very elegant solution but it gets the job done on my way to learn go! | |
*/ | |
// zerome_out.go | |
package main | |
import ( | |
"fmt" | |
) |
This file contains 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
// bit_manipulation.go | |
// You are given two 32-bit numbers, `N` and `M`, and two bit positions, | |
// `i` and `j`. Write a method to set all bits between `i` and `j` in `N` | |
// equal to `M` (e.g. , `M` becomes substring of `N` located at i and string at `j`). | |
// | |
// EXAMPLE: | |
// input: N = 10000000000, M, 10101, i = 2, j = 6 | |
// Output: N = 100001010100 | |
package main |
This file contains 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
import signal | |
class GracefulInterruptHandler(object): | |
def __init__(self, sig=signal.SIGINT): | |
self.sig = sig | |
def __enter__(self): | |
self.interrupted = False |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Config Github Settings | |
github_username = "fideloper" | |
github_repo = "Vaprobash" | |
github_branch = "1.4.0" | |
github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}" | |
# Server Configuration |
This file contains 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
sudo /bin/bash -c "echo 'Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports' >> /etc/sudoers" | |
sudo /bin/bash -c "echo 'Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart' >> /etc/sudoers" | |
sudo /bin/bash -c "echo 'Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports' >> /etc/sudoers" | |
sudo /bin/bash -c "echo '%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE' >> /etc/sudoers" |
OlderNewer