This file contains hidden or 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
| # | |
| # Author:: Christopher Peplin (<peplin@bueda.com>) | |
| # Copyright:: Copyright (c) 2010 Bueda, Inc. | |
| # License:: Apache License, Version 2.0 | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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
| # Firewall configuration written by system-config-firewall | |
| # Manual customization of this file is not recommended. | |
| *filter | |
| :INPUT ACCEPT [0:0] | |
| :FORWARD ACCEPT [0:0] | |
| :OUTPUT ACCEPT [0:0] | |
| -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
| -A INPUT -p icmp -j ACCEPT | |
| -A INPUT -i lo -j ACCEPT | |
| -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT |
This file contains hidden or 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
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
| # NEW WAY / EASY WAY | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.5.deb | |
| sudo dpkg -i elasticsearch-0.90.5.deb |
This file contains hidden or 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/local/bin/python | |
| """ | |
| To use this script, you must be in the root directory of a Rails project that | |
| is using git. You should also make sure that your directory does not contain any | |
| uncommitted changes. Then run: | |
| $ python rails_switch_branch.py name_of_another_branch | |
| Running the above will do the following: |
This file contains hidden or 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
| gem 'omniauth' | |
| gem 'omniauth-facebook' | |
| gem 'clearance' |
This file contains hidden or 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 | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' |
This file contains hidden or 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
| launchctl stop com.mcafee.menulet | |
| launchctl stop com.mcafee.reporter | |
| launchctl remove com.mcafee.menulet | |
| launchctl remove com.mcafee.reporter | |
| sudo su - | |
| launchctl stop com.mcafee.virusscan.fmpd | |
| launchctl stop com.mcafee.ssm.ScanManager |
This file contains hidden or 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
| # Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
| # Will include all hosts the playbook is run on. | |
| # Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
| - name: "Build hosts file" | |
| lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
| when: hostvars[item].ansible_default_ipv4.address is defined | |
| with_items: groups['all'] |
This file contains hidden or 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
| def repair_empty_param_associations | |
| params.keys.each do |key| | |
| repair_nested_params(params, key, params[key]) | |
| end | |
| end | |
| private | |
| def repair_nested_params(current_params, key, value) | |
| if key =~ /^(.*)_attributes$/ && value.nil? |
This file contains hidden or 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
| # fireway configured with: http://major.io/2007/07/01/active-ftp-connections-through-iptables/ | |
| require 'net/ftp' | |
| require 'stringio' | |
| # allows us to upload files by content instead of writing to disk first | |
| class Net::FTP | |
| def puttextcontent(content, remotefile, &block) | |
| f = StringIO.new(content) | |
| begin |