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
class base { | |
group { "puppet": | |
ensure => "present", | |
} | |
exec { "apt_update": | |
command => "apt-get update", | |
path => "/usr/bin" | |
} |
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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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 : | |
# David Lutz's Multi VM Vagrantfile | |
# inspired from Mark Barger's https://gist.github.com/2404910 | |
boxes = [ | |
{ :name => :web, :role => 'web_dev', :ip => '192.168.33.1', :ssh_port => 2201, :http_fwd => 9980, :cpus =>4, :shares => true }, | |
{ :name => :data, :role => 'data_dev', :ip => '192.168.33.2', :ssh_port => 2202, :mysql_fwd => 9936, :cpus =>4 }, | |
{ :name => :railsapp, :role => 'railsapp_dev', :ip => '192.168.33.3', :ssh_port => 2203, :http_fwd => 9990, :cpus =>1} | |
] |
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/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Neste problema, você deverá exibir uma lista de 1 a 100, um em cada linha, com as seguintes exceções: | |
Números divisíveis por 3 deve aparecer como 'Fizz' ao invés do número; | |
Números divisíveis por 5 devem aparecer como 'Buzz' ao invés do número; | |
Números divisíveis por 3 e 5 devem aparecer como 'FizzBuzz' ao invés do número'. | |
""" |
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 | |
ignore_user_abort(true); | |
function syscall ($cmd, $cwd) { | |
$descriptorspec = array( | |
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to | |
2 => array('pipe', 'w') // stderr |
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
require "yaml" | |
# Load up our vagrant config files -- vagrantconfig.yaml first | |
_config = YAML.load(File.open(File.join(File.dirname(__FILE__), | |
"vagrantconfig.yaml"), File::RDONLY).read) | |
# Local-specific/not-git-managed config -- vagrantconfig_local.yaml | |
begin | |
_config.merge!(YAML.load(File.open(File.join(File.dirname(__FILE__), | |
"vagrantconfig_local.yaml"), File::RDONLY).read)) |
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
$ composer show --platform | |
platform: | |
ext-apc [3.1.9] : The apc PHP extension | |
ext-bcmath [0] : The bcmath PHP extension | |
ext-bz2 [0] : The bz2 PHP extension | |
ext-ctype [0] : The ctype PHP extension | |
ext-curl [0] : The curl PHP extension | |
ext-date [5.3.15] : The date PHP extension | |
ext-dom [20031129] : The dom PHP extension | |
ext-ereg [0] : The ereg PHP extension |
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::Config.run do |config| | |
# Основа виртуалки | |
config.vm.box = 'ubuntu12' | |
config.vm.box_url = 'http://dl.dropbox.com/u/1537815/precise64.box' | |
# IP виртуалки | |
config.vm.network :hostonly, '33.33.33.33' | |
# Исолзвать ли экран виртуалки |
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 | |
include '../vendor/autoload.php'; | |
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); | |
$classLoader->register(); | |
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); | |
$classLoader->register(); | |
// config | |
$config = new \Doctrine\ORM\Configuration(); |