DDoS protection - Using Netfilter/iptables @ DevConf.cz Feb 2014
- Disable TCP loose mode
- Disable TCP forwarding
- Enable SYN cookies
- Enable TCP timestamping
- Use SYNPROXY module (Optional)
/etc/sysctl.conf
import configureMockStore from 'redux-mock-store'; | |
import middleware from './middleware'; | |
import actions, { types } from './actions'; | |
describe('test middleware behavior', () => { | |
// Mock jQuery. | |
class jQuery { | |
constructor(selector, context) { } | |
html() { } |
/etc/sysctl.conf
*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] |
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), |
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({ |
const testExpressModule = require('./test-express-module'); | |
module.exports = (req, res) => { | |
res.json({ path: '/bar', testExpressModule }); | |
}; |
const { DataTypes } = require('sequelize'); | |
const ApplicationRecord = require('./application-record'); | |
const Foo = require('./foo'); | |
const Boo = ApplicationRecord.define('Boo', { | |
fooId: DataTypes.INTEGER, | |
booName: DataTypes.STRING | |
}, {}); |
@interface UserController() | |
{ | |
dispatch_semaphore_t _sema_use_log; | |
} | |
@end | |
static UserController *_sguco = nil; | |
@implementation UserController |
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; |
@interface LoginVC () <UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate> | |
{ | |
UserController *_uco; | |
RegisterNC *_rNC; | |
MBProgressHUD *_hud; | |
LoginUserIdTVC* _tvcUserId; | |
LoginPasswdTVC* _tvcPasswd; |