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
# To do this, we call this from the deployment rake task: | |
DEPLOY_TAG = 'last-deploy' | |
# Tag & comment new issues that have been deployed | |
previous_deploy, current_deploy, issues = deploy_issues | |
#which calls this method: | |
def deploy_issues | |
update_branch('master') | |
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
require 'mechanize' | |
#Usage: ruby -rubygems skymiles.rb 123456789 1234 smith | |
acct = ARGV[0] | |
pin = ARGV[1] | |
lastName = ARGV[2] | |
@agent = Mechanize.new | |
page = @agent.get("http://www.delta.com/skymiles/manage_account/index.jsp") |
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
$ip=((gwmi Win32_NetworkAdapterConfiguration | ? { $_.IPAddress -ne $null }).ipaddress | select -First 1) | |
$ipAddressName = $ip.Replace(".","-") | |
If ($env:COMPUTERNAME -eq $ipAddress) { echo $ipAddressName; echo "No need to change" } else { netdom renamecomputer "$env:COMPUTERNAME" /Newname $ipAddressName /REBoot 10 } |
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
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = ENV['twitter_bot_consumer_key'] | |
config.consumer_secret = ENV['twitter_bot_consumer_secret'] | |
config.access_token = ENV['twitter_bot_access_token'] | |
config.access_token_secret = ENV['twitter_bot_access_token_secret'] | |
end | |
client.direct_messages(count: 200).each do |message| | |
if message.full_text =~ /uses TrueTwit validation. To validate click here/ | |
puts "Don't even... #{message.full_text}" |
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
# new file app/controllers/users/passwords_controller.rb | |
class Users::PasswordsController < Devise::PasswordsController | |
def edit | |
super | |
raw, enc = Devise.token_generator.generate(User, :reset_password_token) | |
original_enc = Devise.token_generator.digest(User, :reset_password_token, params[:reset_password_token]) | |
EncoreBackend::User.where(reset_password_token: original_enc).update_all(reset_password_token: enc) | |
@user.reset_password_token = raw | |
end | |
end |
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
FROM nginx:stable-alpine | |
COPY dist /usr/share/nginx/html | |
EXPOSE 80 | |
CMD ["nginx", "-g", "daemon off;"] |
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
FROM openjdk:8-jdk-alpine | |
RUN apk update \ | |
&& apk add --no-cache curl | |
HEALTHCHECK --interval=5s --timeout=5s --retries=12 \ | |
CMD curl --silent --fail localhost:8080/actuator/health || exit 1 | |
VOLUME /tmp | |
ADD target/yourapp-SNAPSHOT.jar app.jar | |
ENV SPRING_PROFILES_ACTIVE cloud-dev | |
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] |
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
#start with our base image (the foundation) - version 7.1.5 | |
FROM businesstools/nginx-php:1.8.0 | |
#install composer | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer | |
#set our application folder as an environment variable | |
ENV APP_HOME /var/www/html | |
ENV COMPOSER_ALLOW_SUPERUSER=1 |
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=nginx ts=2 sw=2 | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header X-XSS-Protection "1; mode=block"; | |
# Make site accessible from http://localhost/ |
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
context('Actions', () => { | |
beforeEach(() => { | |
cy.visit('/login'); | |
}); | |
it('Bad sign in should fail', () => { | |
cy.get('#username') | |
.type('[email protected]'); | |
cy.get('#password') | |
.type('Bad pass'); |
OlderNewer