Skip to content

Instantly share code, notes, and snippets.

View Nav-Appaiya's full-sized avatar
🏠
Available

Nav Appaiya Nav-Appaiya

🏠
Available
View GitHub Profile
@Nav-Appaiya
Nav-Appaiya / Vagrantfile
Created March 26, 2015 01:07
Use nsf for better vagrant performance in windows
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www/public", nfs: true
@Nav-Appaiya
Nav-Appaiya / Vagrant Push Commandlist
Created March 26, 2015 23:13
Vagrant push command to push out code to a FTP server
The Vagrant Push FTP And SFTP strategy supports the following configuration options:
host - The address of the remote (S)FTP server. If the (S)FTP server is running on a non-standard port, you can specify the port after the address (host:port).
username - The username to use for authentication with the (S)FTP server.
password - The password to use for authentication with the (S)FTP server.
passive - Use passive FTP (default is true).
secure - Use secure (SFTP) (default is false).
destination - The root destination on the target system to sync the files (default is /).
exclude - Add a file or file pattern to exclude from the upload, relative to the dir. This value may be specified multiple times and is additive. exclude take precedence over include values.
include - Add a file or file pattern to include in the upload, relative to the dir. This value may be specified multiple times and is additive.
@Nav-Appaiya
Nav-Appaiya / Vagrantfile
Created March 26, 2015 23:35
All possible Vagrant Configuration
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@Nav-Appaiya
Nav-Appaiya / Vagrantfile
Created March 26, 2015 23:35
Vagrant multiple machines
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: "echo Hello"
config.vm.define "web" do |web|
web.vm.box = "apache"
end
config.vm.define "db" do |db|
db.vm.box = "mysql"
end
@Nav-Appaiya
Nav-Appaiya / filling row with 2x 6-col
Created April 7, 2015 20:09
2 column twig loop using twig's batch loop
{% for row in badges|batch(2) %}
<div clas="row">
{% for badge in row %}
<div class="col-md-6">
<img src="{{ badge.imageUrl }}" alt="badge" class="badges img-responsive pull-left"/>
<blockquote class="pull-left">
<h3>{{ badge.assertion.badge.name }}</h3>
<p>{{ badge.assertion.badge.description }}</p>
<small>Achieved on {{ badge.assertion.issued_on }}</small>
@Nav-Appaiya
Nav-Appaiya / main.cpp
Created April 11, 2015 01:00
C++ Multiplication
#include <iostream>
using namespace std;
int main() {
cout << "Incert two numbers: " << endl;
// cout << endl;
int n = 0; int m =0;
cin >> n >> m;
cout << "Multiplication of: " << n << " and " << m << " is: " << n * m << endl;
@Nav-Appaiya
Nav-Appaiya / leech.php
Last active August 29, 2015 14:19 — forked from bigcalm/leech.php
<?php
$baseDir = "mp3s";
$soundcloudURL = "http://soundcloud.com/ninja-tune/sets/solid-steel-radio-shows/";
$urlBits = str_replace('http://', '', $soundcloudURL);
$urlBits = preg_replace('@/$@', '', $urlBits);
$urlBits = explode("/", $urlBits);
/**
* http://soundcloud.com/ninja-tune/sets/solid-steel-radio-shows/
@Nav-Appaiya
Nav-Appaiya / gist:068563087ae64e7573ab
Created May 9, 2015 17:46
New Symfony learning source (sf basics)
https://www.youtube.com/watch?v=4vi1eWE0L4Q&list=PL3Wxyd2R8-gIuToQ1NmhVSLZfjrBMePNu
@Nav-Appaiya
Nav-Appaiya / phpacademy on youtube
Created May 10, 2015 11:54
Sign In With Google API Resources (video tutorials)
Want to allow your users to sign in with Google on your website? This series covers implementing authentication between your website and Google.
https://www.youtube.com/watch?v=oxa581kKBNg&list=PLfdtiltiRHWFIbiGNaGW1qreZNrx7uOAG
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Project Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<link rel="shortcut icon" href="favicon.ico">
<!-- Twitter Bootstrap -->