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
sudo certbot --authenticator standalone --installer nginx -d <domain name> -d <domain name> --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx" |
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
- (IBAction)animateTapped:(id)sender { | |
[self animateMask:maskLayer forImageView:self.tailsImage]; | |
} | |
- (void)animateMask:(CAShapeLayer *)mask forImageView:(UIImageView *)image{ | |
// https://stackoverflow.com/questions/11391058/simply-mask-a-uiview-with-a-rectangle | |
if(image == 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
// upush://view?subject=moral&files=lect1.docx | |
-(void)openLink:(NSURL *)url { | |
NSString *host = [url host]; | |
//param=value | |
NSString *query = [url query]; | |
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO]; | |
NSArray *queryItems = [components queryItems]; | |
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
@boardsize = 0 | |
@boards_map = Array.new(1) {Array.new(1,"·")} | |
positionArray = Array.new | |
# keep track of how many X in a given row | |
@row_stats = Array.new | |
# keep track of how many X in a give column | |
@column_stats = Array.new |
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
// | |
// UIViewController+Utils.m | |
// Novel | |
// | |
// Created by Axel Kee on 07/12/2016. | |
// Copyright © 2016 Javed. All rights reserved. | |
// | |
#import "UIViewController+Utils.h" |
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
server { | |
listen 80; | |
server_name fluffy.es; | |
#location / { | |
# proxy_set_header X-Real-IP $remote_addr; | |
# proxy_set_header Host $http_host; | |
# proxy_pass http://127.0.0.1:2368; | |
#} | |
#location ~ /.well-known { |
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
// | |
// ViewController.swift | |
// Animated Button | |
// | |
// Created by Soul on 20/10/2016. | |
// Copyright © 2016 sweatshops. All rights reserved. | |
// | |
import UIKit |
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
{ | |
"Version": "2012-10-17", | |
"Id": "Prevent hotlink image", | |
"Statement": [ | |
{ | |
"Sid": "Only allow the domain and localhost", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::littlefoximage/*", |
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
scp -P port_number_here config/application.yml username@remote_server_ip:/home/username/app_name/config/application.yml |
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
git remote add live ssh://username@your_server_ip:port/home/username/repo/app_name.git |