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/bash | |
# The name of the .jar file for the latest version. | |
MINECRAFT_LATEST="minecraft_server.1.7.9.jar" | |
# The URL for the lates version of the minecraft server | |
MINECRAFT_LATEST_LINK="https://s3.amazonaws.com/Minecraft.Download/versions/1.7.9/minecraft_server.1.7.9.jar" | |
# The screen name for the Minecraft Server | |
MINECRAFT_SCREEN_NAME="Minecraft" | |
# Setup some variables |
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/bash | |
### | |
# | |
# : Usage | |
# ./start -j server.jar -m 2G | |
# -j ) Path to the jar file | |
# -m ) Amount of memory to give the Java process | |
# | |
### |
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
--[[ | |
By: skylarsch | |
Usage: room <length (9)> <width (9)> <height (5)> | |
Each of the arguments are optional, but if you must specify all the values before the one you want to change. | |
--]] | |
-- MARK: Helper Functions | |
function fwd() -- Move forward | |
while not turtle.forward() do |
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
--[[ | |
By: skylarsch | |
Usage: branch <number of tunnels (8)> <length of each tunnel (10)> <space between tunnels (2)> | |
Each of the arguments are optional, but if you must specify all the values before the one you want to change. | |
--]] | |
-- MARK: Helper Functions | |
function fwd() -- Move forward | |
while not turtle.forward() do |
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/ruby | |
## Helpers | |
def get_word(words) | |
words.sample | |
end | |
def get_sentence(words) | |
count = (10..16).to_a.sample | |
str = "" | |
(0..count).each do |
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
int32_t hex = 0x2578CB; | |
[[UIColor alloc] initWithRed:(((hex >> 16) & 0xFF) / 255.0) green:(((hex >> 8) & 0xFF) / 255.0) blue:((hex & 0xFF) / 255.0) alpha:1.0]; |
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
# | |
# Used to valide image sizes in an Xcode asset cataloge. | |
# | |
# If a @1x image is 100x100 this will verify the @2x is 200x200 (+/- 4) and the @3x is 300x300 (+/- 4) | |
# | |
# Usage: | |
# ruby size.rb /full/path/to/assets/Images.xcassets | |
# | |
# Output: | |
# image@3x.png |
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
#import <Foundation/Foundation.h> | |
@interface NSDate (Additions) | |
+ (instancetype)dateWithISO8601DateString:(NSString *)date; | |
+ (instancetype)dateWithISO8601DateTimeString:(NSString *)date; | |
@end | |
@interface NSDateFormatter (Additions) |
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
UIKIT_EXTERN CGFloat SKYDistanceFromPointToPoint(CGPoint, CGPoint); |
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
# In spec/support/presence.rb | |
RSpec.shared_examples 'presence' do |attrs| | |
describe 'presence validations' do | |
attrs.each do |attr| | |
it "checks presence of #{attr}" do | |
target = described_class.name.downcase.to_sym | |
obj = FactoryGirl.build target, attr.to_sym => nil | |
expect(obj.valid?).to eq false | |
expect(obj.errors[attr.to_sym].size).to eq 1 | |
end |
OlderNewer