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
| # Ways to execute a shell script in Ruby | |
| # Example Script - Joseph Pecoraro | |
| cmd = "echo 'hi'" # Sample string that can be used | |
| # 1. Kernel#` - commonly called backticks - `cmd` | |
| # This is like many other languages, including bash, PHP, and Perl | |
| # Synchronous (blocking) | |
| # Returns the output of the shell command | |
| # Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
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/bin/env ruby | |
| # A quick and dirty implementation of an HTTP proxy server in Ruby | |
| # because I did not want to install anything. | |
| # | |
| # Copyright (C) 2009-2014 Torsten Becker <torsten.becker@gmail.com> | |
| # | |
| # 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, |
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
| """ | |
| ============= | |
| stringmethods | |
| ============= | |
| Make possible to use all Python string methods as Django template filters. Also | |
| provide custom template tag ``{% stringmethod %}`` to use methods with more | |
| than one argument, like ``format``, ``count`` and other. | |
| Restrictions |
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
| <?php | |
| // jSON URL which should be requested | |
| $json_url = 'https://graph.facebook.com/YOUR_APP_ID/accounts/test-users?access_token=YOUR_APP_ID|YOUR_APP_SECRET'; | |
| // Initializing curl | |
| $ch = curl_init( $json_url ); | |
| // Configuring curl options | |
| $options = array( |
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/bin/ruby | |
| ## | |
| # Classifies a puppet node based on its EC2 security group. | |
| # Requires the AWS gem. | |
| # Also requires a node_groups.yml file which specifies security groups | |
| # and the classes/params that should be applied, in the following | |
| # format (additionally keyed by security group name). | |
| # http://docs.puppetlabs.com/guides/external_nodes.html | |
| # |
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/bin/env ruby | |
| # An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile's | |
| # HTTP implementation. | |
| # | |
| # Author: Jon Maken | |
| # License: 3-clause BSD | |
| # Revision: 2012-03-25 23:01:19 -0600 | |
| require 'net/http' | |
| require 'net/https' if RUBY_VERSION < '1.9' |
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/bash | |
| PID_FILE=/var/run/fluentd.pid | |
| CONF_FILE=/etc/fluent/fluent.conf | |
| LOG_FILE=/var/log/fluent/fluent.log | |
| PSNAME="fluentd --daemon" | |
| F_USER=fluentd | |
| F_GROUP=fluentd | |
| RUBY_VER="1.9.3-p194" |
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
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |
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
| ORIGINAL_JENKINS_SERVER= | |
| ORIGINAL_SERVER_USER= | |
| NEW_JENKINS_SERVER= | |
| NEW_SERVER_USER= | |
| # ON THE ORIGINAL JENKINS SERVER | |
| ssh $ORIGINAL_SERVER_USER@$ORIGINAL_JENKINS_SERVER | |
| cd /var/lib/jenkins/ | |
| for i in `ls jobs`; do echo "jobs/$i/config.xml";done > config.totar |
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
| # vim: ft=yaml | |
| # Elastic Load Balancer and Security Group configuration for the app | |
| # | |
| # - Allow anyone to connect to port 443 and office traffic to connect to | |
| # port 22 | |
| # - Ensure all traffic is encrypted by configuring load balancer to listen on | |
| # 443 and direct traffic to port 443 on app servers | |
| # - Enable cookie-based session stickiness | |
| # - Use /status for health check | |
| # - Enable backend authentication policy by providing public key for cert |
OlderNewer