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
// | |
// APIRequest.swift | |
// | |
// Created by 家齊 on 2016/12/27. | |
// Copyright © 2016年 Archie Chang. All rights reserved. | |
// | |
import Alamofire | |
class APIRequest { |
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
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Web Security in CTF</title><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.3.0/css/reveal.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.3.0/css/theme/black.min.css"> | |
<!-- Theme used for syntax highlighting of code --> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.3.0/lib/css/zenburn.min.css"> | |
<!-- Custom settings --> | |
<link rel="stylesheet" href="css/custom.css"> | |
<!-- Printing and PDF exports --> | |
<script> | |
var link = document.createElement( 'link' ); | |
link.rel = 'stylesheet'; | |
link.type = 'text/css'; |
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
# -*- coding: utf8 -*- | |
import jwt | |
import time | |
import json | |
import os | |
from hyper import HTTPConnection | |
class ApnsPusher: | |
def __init__(self, apns_key_id = '', apns_key_name = '.p8', team_id = '', bundle_id = ''): |
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
class SingletonDemo { | |
static let shared = SingletonDemo() | |
} |
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 <UIKit/UIKit.h> | |
@interface SingletonDemo : NSObject | |
+ (instancetype)shared; | |
@end |
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 "SingletonDemo.h" | |
@implementation SingletonDemo | |
+ (instancetype)shared { | |
static ArchieSingleton *instance = nil; | |
static dispatch_once_t once_token; | |
dispatch_once(&once_token, ^{ | |
instance = [[ArchieSingleton alloc] init]; | |
}); |
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
http { | |
proxy_buffer_size 128k; | |
proxy_buffers 4 256k; | |
proxy_busy_buffers_size 256k; | |
fastcgi_buffer_size 128k; | |
fastcgi_buffers 4 256k; | |
fastcgi_busy_buffers_size 128k; | |
... |
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
cd /var | |
touch swap.img | |
chmod 600 swap.img | |
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000 | |
mkswap /var/swap.img | |
swapon /var/swap.img | |
# swapoff /var/swap.img |
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
NS_ASSUME_NONNULL_BEGIN | |
@interface DemoObject : NSObject | |
@property (nonatomic) NSString *name; | |
@property (nonatomic, nullable) NSString *address; | |
@property (nonatomic, readonly) NSString *phoneNumber; | |
@end |
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
- (void)observe:(nullable id)object keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options block:(FBKVONotificationBlock)block; |
OlderNewer