Skip to content

Instantly share code, notes, and snippets.

Ian Cook thinkspill

Block or report user

Report or block thinkspill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GUI
GUI / install_vagrant_sudoers.sh
Created Jun 3, 2012 — forked from beddari/install_vagrant_sudoers.sh
Allow Vagrant sudo-access without password for NFS-setup (for OS X)
View install_vagrant_sudoers.sh
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports
@Stubbs
Stubbs / main.yml
Created Mar 28, 2015
Ansible Playbook to install PHP7
View main.yml
- name: Install Packages Needed To Compile PHP 7
apt: pkg={{ item }} state=latest
with_items:
- git
- autoconf
- bison
- libxml2-dev
- libbz2-dev
- libmcrypt-dev
- libcurl4-openssl-dev
@fightbulc
fightbulc / vagrant-vmware-packaging.md
Last active Mar 19, 2019
Packaging VMWare Fusion Vagrant Box
View vagrant-vmware-packaging.md

On Mac

Go to vmware vm files:
cd /path/to/vagrant-vm/.vagrant/machines/default/vmware_fusion/some-random-string

Defragment vm disk:
/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -d Virtual\ Disk.vmdk

Shrink vm disk:
/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -k Virtual\ Disk.vmdk

@AutomationD
AutomationD / Logstash.xml
Last active Apr 4, 2019
Logstash IntelliJ Idea Filetype
View Logstash.xml
<filetype binary="false" description="Logstash Config" name="Logstash Config">
<highlighting>
<options>
<option name="LINE_COMMENT" value="#" />
<option name="COMMENT_START" value="" />
<option name="COMMENT_END" value="" />
<option name="HEX_PREFIX" value="" />
<option name="NUM_POSTFIXES" value="" />
<option name="HAS_BRACES" value="true" />
<option name="HAS_BRACKETS" value="true" />
@airways
airways / 1 dist.config.php
Created Nov 1, 2011
Simple, single ExpressionEngine configuration file to override almost all paths and server settings. As used by @airways and @litzinger.
View 1 dist.config.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Simple, single configuration file to override almost all paths and server settings. As used by @airways
// and @litzinger.
// Only check in the default as dist.config.php, set your version control system to ignore config.php so that
// local users and each instance (staging, production) can have their own settings.
// These config files are mainly meant to be used on a shared development server used by all developers,
// although it works almost as well for local development as well.
@SamuelChristie
SamuelChristie / tls_1_deprecation.md
Created Nov 2, 2015
Explanation of how to detect TLS 1.0 connections and, by way of custom headers, warn the user about the coming change to more modern TLS versions.
View tls_1_deprecation.md
@ziadoz
ziadoz / awesome-php.md
Last active Oct 9, 2019
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
View awesome-php.md
@havvg
havvg / ajax-form.js
Created Aug 1, 2012
jQuery AJAX form submit with Twitter Bootstrap modal
View ajax-form.js
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@davejamesmiller
davejamesmiller / Laravel-Container.md
Last active Oct 12, 2019
Laravel's Dependency Injection Container in Depth
View Laravel-Container.md

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

You can’t perform that action at this time.