Skip to content

Instantly share code, notes, and snippets.

# -*- 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
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
sudo nano ~/.bashrc
after added to the last row
export ANDROID_HOME=~/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
@kzorluoglu
kzorluoglu / gist:0b429870a013dc96133c97a88a55265f
Created June 1, 2016 07:53 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@kzorluoglu
kzorluoglu / Vagrantfile
Last active December 12, 2019 11:10
Simple Vagrantfile with Ubuntu LAMP composer
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/trusty64"
#!/usr/bin/env bash
# Use single quotes instead of double quotes to make it work with special-character passwords
PASSWORD='PASSWORDHERE'
PROJECTFOLDER='PROJECTFOLDERHERE'
# create project folder
sudo mkdir "/var/www/html/${PROJECTFOLDER}"
# update / upgrade
@kzorluoglu
kzorluoglu / laravel.js
Created January 9, 2017 08:22 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
@kzorluoglu
kzorluoglu / BodyguardViewController.swift
Last active July 7, 2017 09:40
Capture Photo from Camera Preview Layer Swift 3
//
// BodyguardViewController.swift
// My Mobile Bodyguard
//
// Created by Koray Zorluoglu on 06.07.17.
// Copyright © 2017 Koray Zorluoglu. All rights reserved.
//
import UIKit
import AVFoundation
@kzorluoglu
kzorluoglu / SqliteStorage.php
Created August 11, 2017 22:57
PHP - PDO Fetch All Objects with Model Class
$query = $this->db->query('SELECT * FROM '.$this->table);
$result = $query->fetchAll(\PDO::FETCH_CLASS, 'Your\\Namespace\\andClassName');
return $result;
@kzorluoglu
kzorluoglu / .gitlab-ci.yml
Created February 4, 2019 16:03 — forked from vojtasvoboda/.gitlab-ci.yml
GitLab CI FTP deploy with mwienk/docker-lftp docker image
stages:
- test
- deploy
cache:
paths:
- vendor
# test job
test: