Skip to content

Instantly share code, notes, and snippets.

View atwalsh's full-sized avatar

Adam Walsh atwalsh

View GitHub Profile
//inside didFinishLaunchingWithOptions in deleagte
if ([PFUser currentUser]) {
// Present wall straight-away
[self presentWallViewControllerAnimated:NO];
} else {
// Go to the welcome screen and have them log in or create an account.
[self presentLoginViewController];
}
// end
@atwalsh
atwalsh / checkStatus.rb
Created March 19, 2015 00:54
USNWC Trail Status checker
require 'open-uri'
content = open('http://usnwc.org/#trail-status').read
if content =~ /trailsclosed\.png/
puts "Trails closed!"
elsif content =~ /trailsopen\.png/
puts "Trails open!"
else
puts "Oops, images not found?"
end
@atwalsh
atwalsh / ArrayWork.java
Last active August 29, 2015 14:18
ITCS 1213 Lab 8
/**
*
* @author adamwalsh
*/
import java.util.*;
public class ArrayWork {
/**
* @param args the command line arguments
*/
@atwalsh
atwalsh / MainPage.xaml.cs
Last active August 29, 2015 14:18
textBlock example
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
@atwalsh
atwalsh / block.java
Created April 14, 2015 13:35
Block moves
//horizontal
for(int i = 0; i<3; i++){
if(gameBoard[0][i] == (gameBoard[1][i]) && gameBoard[0][i] == (hmarker)){
if(gameBoard[2][i] != marker && gameBoard[2][i] != hmarker){
gameBoard[2][i] = marker;
//boolean placed = true;
return;
}
}
}
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
@atwalsh
atwalsh / MultiTenantFlask.py
Created October 23, 2017 20:45 — forked from TonyFrancis/MultiTenantFlask.py
Creating multi Tenant system with multiple Database. Switching between databases based on subdomain related to tenant
from functools import wraps
from flask import Flask, g, session, request, abort, jsonify
from flask_migrate import MigrateCommand, Migrate
from flask_script import Manager
from flask_sqlalchemy import SQLAlchemy
flask_app = Flask(__name__, static_folder='./static')
db = SQLAlchemy()
migrate = Migrate()
@atwalsh
atwalsh / README.md
Created July 17, 2018 21:18 — forked from magnetikonline/README.md
AWS Elastic Beanstalk deploy user restricted IAM policy.

AWS Elastic Beanstalk deploy user restricted IAM policy

An IAM user policy document to give minimal rights for deploying an Elastic Beanstalk application.

Where:

  • REGION: AWS region.
  • ACCOUNT_ID: AWS account ID.
  • APPLICATION_NAME: Desired target Elastic Beanstalk application name(space).
  • IAM_INSTANCE_PROFILE_ROLE: The instance profile (IAM role) Elastic Beanstalk EC2 instaces will run under.

Keybase proof

I hereby claim:

  • I am atwalsh on github.
  • I am atwalsh (https://keybase.io/atwalsh) on keybase.
  • I have a public key ASC0Yn5HT554e9wQT8kDvagJiFqruwq4xK96mP6n4fwGswo

To claim this, I am signing this object:

2020-05-15T14:55:14.145878+00:00 app[worker.1]: 2020.05.15 14:55:14 LOG3[3]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2020-05-15T14:55:14.145893+00:00 app[worker.1]: 2020.05.15 14:55:14 LOG5[3]: Connection closed: 100 byte(s) sent to TLS, 12 byte(s) sent to socket
2020-05-15T14:55:14.147217+00:00 app[worker.1]: 2020.05.15 14:55:14 LOG3[4]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2020-05-15T14:55:14.147259+00:00 app[worker.1]: 2020.05.15 14:55:14 LOG5[4]: Connection closed: 892 byte(s) sent to TLS, 9 byte(s) sent to socket
2020-05-15T14:55:14.345875+00:00 app[worker.1]: 2020.05.15 14:55:14 LOG3[2]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2020-05-15T14:55:14.345883+00:00 app[worker.1]: 2020.05.15 14:55:14 LOG5[2]: Connection closed: 100 byte(s) sent to TLS, 12 byte(s) sent to socket
2020-05-15T14:55:15.249901+00:00 app[worker.1]: 2020.05.15 14:55:15 LOG3[8]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2020-05-15T14:55:15.249927+00:00 app[worker.1]: 2020.05.15 1