Skip to content

Instantly share code, notes, and snippets.

View kaka2507's full-sized avatar
🇻🇳
Stay Hungry, Stay Foolish

Daniel Doan kaka2507

🇻🇳
Stay Hungry, Stay Foolish
View GitHub Profile
import 'package:app/base/failure/failure.dart';
import 'package:app/base/widget/custom_app_bar.dart';
import 'package:app/base/widget/loading.dart';
import 'package:app/config/colors.dart';
import 'package:app/config/dimensions.dart';
import 'package:app/config/text_styles.dart';
import 'package:app/utils/failure_helper.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
schema {
query: Query
}
type CategoryType {
id: ID!
name: String!
ingredients: [IngredientType]
}
from locust import HttpLocust, TaskSet, task
import random
import json
class EventAPITasks(TaskSet):
def on_start(self):
with self.client.post("/api/user/register", {
'username': self.locust.username,
'password': self.locust.password
ps -eo rss,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |cut -d "" -f2 | cut -d "-" -f1
@kaka2507
kaka2507 / influxdb-amazon-linux.md
Created January 16, 2018 03:49 — forked from techgaun/influxdb-amazon-linux.md
InfluxDB on Amazon Linux

Last updated: 2017-03-22 : Update to 1.2.2

The following assumes you're executing as a root user

Pre-install

yum update
yum install -y git
mkdir -p /opt/influx/{wal,data,ssl}
import sun.net.www.protocol.https.HttpsURLConnectionImpl;
import javax.net.ssl.*;
import java.net.HttpURLConnection;
import java.security.Principal;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
package mm.com.mypay.consumer.utils;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Typeface;
import android.util.AttributeSet;
import mm.com.mypay.consumer.uis.views.CustomFontTextView;
import mm.com.mypay.consumer.R;
import mm.com.mypay.consumer.uis.activities.BaseActivity;
package mm.com.mypay.consumer.uis.views;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;
import mm.com.mypay.consumer.uis.views.CustomFontTextView;
import mm.com.mypay.consumer.utils.CustomFontUtils;
package com.talentora.commons;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.Filter;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.appender.RollingFileAppender;
import org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy;
import org.apache.logging.log4j.core.appender.rolling.RollingFileManager;
if (Build.VERSION.SDK_INT >= 16 && !TextUtils.isEmpty(info.url)) {
NotificationImageTask nit = new NotificationImageTask(new MyNotification(this.mNotificationManager, builder, info));
nit.execute(info.url);
} else {
builder.setContentTitle(info.title).setContentText(info.text);
Notification notification = builder.build();
if (notification != null) {
if (Shared.getInstance().getBoolean("PREF_NOTIFICATION_SOUND", true))
notification.defaults |= Notification.DEFAULT_SOUND;
if (Shared.getInstance().getBoolean("PREF_NOTIFICATION_VIBRA", true))