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 : | |
# 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. | |
# Named boxes, like this one, don't need a URL, since the are looked up |
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
Vagrant.configure(2) do |config| | |
# Box to use. | |
config.vm.box = "puphpet/centos65-x64" | |
# Port forwarding. | |
config.vm.network "forwarded_port", guest: 80, host_ip: "127.0.0.1", host: 8080 | |
config.vm.provider "virtualbox" do |vb| | |
# Display the VirtualBox GUI when booting the machine |
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 | |
// ============================================================================== | |
// BEGIN VERBOSE DEBUGGING | |
curl_setopt($ch, CURLOPT_VERBOSE, true); | |
$verbose = fopen('php://temp', 'w+'); | |
curl_setopt($ch, CURLOPT_STDERR, $verbose); | |
$result = curl_exec($ch); | |
if ($result === 0) { | |
printf("cUrl error (#%d): %s<br>\n", curl_errno($ch), |
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
#!/bin/bash | |
# will probably see: /sbin/mount.vboxsf: mounting failed with the error: No such file or directory | |
# this is fine, carry on. | |
mount -t vboxsf Shared_Folder ~/SF/ | |
cd /opt/VBoxGuestAdditions-*/init | |
./vboxadd setup |
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
#!/bin/bash | |
echo "updating packages" | |
yum -y update | |
echo "install YUM development tools" | |
yum groupinstall -y development | |
echo "installing additional packages" | |
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel |
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 | |
return slack(); | |
function slack() { | |
$data = []; | |
// You can get your webhook endpoint from your Slack settings | |
$ch = curl_init(""); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, array('payload' => $data)); |
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
#!/bin/bash | |
# Backup device | |
adb backup -apk -shared -all -f 'C:\android_backup.ab' | |
# confirm | |
# keyevents: | |
# 22 - KEYCODE_DPAD_RIGHT - "back up my data" | |
# 23 - KEYCODE_DPAD_CENTER - "enter" | |
# adb shell input text <your password> |
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
# crstov-zsh (2017). | |
# Chris Rowles <github.com/Crowles> | |
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then | |
turquoise="%F{81}" | |
orange="%F{166}" | |
purple="%F{135}" | |
hotpink="%F{161}" | |
limegreen="%F{118}" | |
grey="%F{250}" |
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
alias statc="stat -c '%a %G:%U %n'" | |
alias ccat="pygmentize -g" | |
alias tlog="tail -f -n 0 storage/logs/laravel.log" | |
alias phpcf="php --ini | grep 'Loaded'" | |
eval $(thefuck --alias) | |
# custom functions | |
# IP Lookup | |
function rip |
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
#!/bin/bash | |
if ! type vim > /dev/null; then | |
echo "installing vim" | |
yum install -y vim | |
else | |
echo "Vim installed, continuing" | |
fi | |
if ! type dos2unix > /dev/null; then |
OlderNewer