Skip to content

Instantly share code, notes, and snippets.

Calvin Huang Calvin-Huang

Block or report user

Report or block Calvin-Huang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View API.m
@interface VIGP2API()
{
AnGooGeneralCallbackBlock _callBack;
}
@property AnGooGeneralCallbackBlock PushMsgCallbackBlock;
@end
static TIAESCipher *_sgAesEngineObj = nil;
@implementation VIGP2API
View LoginVC.m
@interface LoginVC () <UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate>
{
UserController *_uco;
RegisterNC *_rNC;
MBProgressHUD *_hud;
LoginUserIdTVC* _tvcUserId;
LoginPasswdTVC* _tvcPasswd;
View UserController.h
NS_ASSUME_NONNULL_BEGIN
@interface UserController : NSObject
+(UserController*)sigleton;
//Login
- (void) userLoginWithAccountId:(NSString*)accId
passwd:(NSString*)passwd
socialType:(NSString*)socialType //N:None; FB:facebook; G:GSI
completion:(GeneralCallbackBlock)completion;
View UserController.m
@interface UserController()
{
dispatch_semaphore_t _sema_use_log;
}
@end
static UserController *_sguco = nil;
@implementation UserController
View boo.js
const { DataTypes } = require('sequelize');
const ApplicationRecord = require('./application-record');
const Foo = require('./foo');
const Boo = ApplicationRecord.define('Boo', {
fooId: DataTypes.INTEGER,
booName: DataTypes.STRING
}, {});
View test-express-bar.js
const testExpressModule = require('./test-express-module');
module.exports = (req, res) => {
res.json({ path: '/bar', testExpressModule });
};
View FP-example.js
export const scheduleEpic = action$ => action$.pipe(
ofType(FETCH_SCHEDULE_REQUEST),
debounceTime(300),
switchMap(({ payload }) => (
ajax.getJSON(`${API_URL}/AvailableSeatStatusList/${payload.OriginStationID}`).pipe(
map(response => ({
...payload,
availableSeatTable: availableFormater(response[0], payload.DestinationStationID),
})),
catchError(error => of({
View FP-example-reformatted.js
export const scheduleEpic = action$ => action$.pipe(
ofType(FETCH_SCHEDULE_REQUEST),
debounceTime(300),
switchMap(({ payload }) => {
return ajax
.getJSON(`${API_URL}/AvailableSeatStatusList/${payload.OriginStationID}`)
.pipe(
map(response => ({
...payload,
availableSeatTable: availableFormater(response[0], payload.DestinationStationID),
@Calvin-Huang
Calvin-Huang / iptables
Created Mar 30, 2018 — forked from shikendon/deploy-forwarding-rules.sh
Minecraft Anti-DDoS iptables configuration
View iptables
*raw
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A PREROUTING -p tcp -m tcp --dport 25565 -j CT --notrack
COMMIT
*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
@Calvin-Huang
Calvin-Huang / ddos-mitigation-notes.md
Created Mar 30, 2018 — forked from shikendon/ddos-mitigation-notes.md
Best Practices for DDoS Protection and Mitigation on Linux
View ddos-mitigation-notes.md
You can’t perform that action at this time.