Skip to content

Instantly share code, notes, and snippets.

@anotherZero
anotherZero / Vagrantfile
Created December 11, 2017 16:53 — forked from danrjohnson/Vagrantfile
SaltStack with Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
config.vm.box = "ubuntu/trusty32"
# dump mysql
dump_source_db:
salt.state:
- tgt: {{ source_servername }}
- context:
'databases': 'database_name'
'dump_file': '/tmp/dump.sql.gz'
- sls:
- orch.migrate.db_dump
// ...
let webpack = require("webpack");
mix.webpackConfig({
plugins: [
// Choose the language you want to keep (Ex: "fr")
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /fr/)
]
});
@anotherZero
anotherZero / rules-both.iptables
Created March 28, 2017 20:49 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@anotherZero
anotherZero / gist:cb5add06538890ba875f
Last active August 29, 2015 14:27 — forked from borutmrak/gist:9b0384c9bc3066e7e999
ubuntu ttf-mscorefonts-installer Salt state
ttf-mscorefonts-installer:
debconf.set:
- name: ttf-mscorefonts-installer
- data: { 'msttcorefonts/accepted-mscorefonts-eula': { 'type': 'boolean', 'value': True } }
pkg.installed:
- pkgs:
- ttf-mscorefonts-installer
- requires:
- debconf: ttf-mscorefonts-installer
<?php namespace MyApp\Providers;
use Exception;
use Cartalyst\Sentry\Sentry;
use Cartalyst\Sentry\Users\UserInterface;
use Tymon\JWTAuth\Providers\Auth\AuthInterface;
class SentryAuthAdapter implements AuthInterface
{
/**
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}
References:
[1] http://www.virtualzone.de/2012-05-01/ubuntu-12-04-on-citrix-xenserver-5-6/
[2] http://thetechshop.org/showthread.php?847-Citrix-Xenserver-Template-for-Ubuntu-12.04-and-the-weird-Rebooting-to-Read-Only-Mode
Steps:
1. New VM
* Two choices: