Skip to content

Instantly share code, notes, and snippets.

View nguyenchilong's full-sized avatar

Long Nguyen nguyenchilong

  • Vietnam
  • 01:55 (UTC +07:00)
  • LinkedIn in/longnc
View GitHub Profile
// add this line
Alice alice = Alice(showNotification: true);
//
@override
Widget build(BuildContext context) {
return StoreProvider<AppState>(
store: widget.store,
child: MaterialApp(
title: 'saidlty',
locale: _options.languageLocale,
import 'dart:async';
import 'package:path/path.dart';
import 'package:saidlty/data/model/photo_data.dart';
import 'package:saidlty/data/network_common.dart';
class PhotoRepository {
const PhotoRepository();
// method => get
// url => baseurl/sliders
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:saidlty/main.dart';
import 'package:shared_preferences/shared_preferences.dart';
class NetworkCommon {
static final NetworkCommon _singleton = new NetworkCommon._internal();
factory NetworkCommon() {
class Photo {
String createdAt;
String photo;
int id;
int user;
String updatedAt;
Photo({
this.createdAt = "",
this.photo = "",
-- --------------------------------------------------------
--
-- Table structure for table `subregions`
--
CREATE TABLE IF NOT EXISTS `subregions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`region_id` int(10) unsigned DEFAULT NULL,
`name` varchar(45) DEFAULT NULL,
--
-- Table structure for table `regions`
--
CREATE TABLE IF NOT EXISTS `regions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`iso` varchar(45) DEFAULT NULL,
`iso3` varchar(45) DEFAULT NULL,
-- https://en.wikipedia.org/wiki/List_of_country_calling_codes
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
@nguyenchilong
nguyenchilong / nginx-tuning.md
Created July 25, 2019 16:45 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@nguyenchilong
nguyenchilong / curl.md
Created July 20, 2019 20:01 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.