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 'package:flutter/material.dart'; | |
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart'; | |
class WebViewContainer extends StatefulWidget { | |
final url; | |
WebViewContainer(this.url); | |
@override | |
createState() => _WebViewContainerState(); | |
} |
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 i3ipc | |
import os | |
SET_BRIGHTNESS = 'xbacklight -set ' | |
GET_BRIGHTNESS = 'xbacklight' | |
i3 = i3ipc.Connection() | |
class BrightnessController: | |
def __init__(self): | |
self.brightness_map = {} |
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
1. Clone code from repo https://github.com/vaibhav93/freaco | |
2. Install docker for windows/mac/linux | |
3. Create AWS account (if you need push notification on phone app. | |
If you dont want push notification, skip step 3 & 4. Backend can run without this too) | |
4. Use "accessKeyId" and "secretAccessKey" for this AWS account ( to update the file "server/boot/awsconfig.json". | |
You can google how to get accessKey and secretAccessKey from aws console | |
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
Launching lib/main.dart on Android SDK built for x86 in debug mode... | |
Initializing gradle... | |
Resolving dependencies... | |
Gradle task 'assembleDebug'... | |
Built build/app/outputs/apk/debug/app-debug.apk. | |
Installing build/app/outputs/apk/app.apk... | |
Syncing files to device Android SDK built for x86... | |
I/flutter (26407): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ | |
I/flutter (26407): The following assertion was thrown during performLayout(): | |
I/flutter (26407): 'package:flutter/src/rendering/viewport.dart': Failed assertion: line 1213 pos 12: 'center.parent == |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { |
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
while ((line = br.readLine()) != null) { | |
// process the line. | |
Pattern pattern = Pattern.compile(".*_([a-zA-Z] )_.*"); | |
Matcher matcher = pattern.matcher(line); | |
if (matcher.find()) | |
{ | |
// Action = If, Tiger, After, ..... | |
String action = matcher.group(1); | |
System.out.println(action); |
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
// POST http://admin.pinkcityrickshawcompany.com/v1/users/:user_id/update_payment | |
// NOTE user_id as params in URL | |
// NOTE send access-token in request headers | |
{ | |
"razor_payment_id" : "razr345466" | |
} | |
//RESPONSE | |
{ | |
"createdAt": "2018-07-29T18:15:51.699Z", |
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
// POST http://admin.pinkcityrickshawcompany.com/v1/users/:user_id/create_payment | |
// NOTE user_id as params in URL | |
// NOTE send access-token in request headers | |
{ | |
"customer_name":"Vaibhav Bansal", | |
"customer_contact":"9911020699", | |
"customer_email": "[email protected]", | |
"activity_id": 8, | |
"activity_name": "Jaipur tour" // Helps avoid join on backend. So please send | |
"pickup_time": "10:00AM", |
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
{ | |
"id": 8, | |
"name": "kdjgkjd", | |
"longitude": 43.434, | |
"latitude": 23.4343, | |
"shortDescription": "k", | |
"knowMore": "k", | |
"beforeYouGo": null, | |
"behindScenes": null, | |
"duration": null, |
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
var Kafka = require('node-rdkafka'); | |
var producer = require('./producer'); | |
var consumer = new Kafka.KafkaConsumer({ | |
//'debug': 'all', | |
'metadata.broker.list': 'gc-mskafka1002.pp-devqa-ms-thirdparty.us-central1.gcp.dev.paypalinc.com:9092', | |
'group.id': 'node-rdkafka-consumer-flow-example', | |
'enable.auto.commit': false, | |
'socket.keepalive.enable': true, | |
'reconnect.backoff.jitter.ms': 500 |
NewerOlder