This file contains hidden or 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:checksheett/config/AppConstants.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:graphql_flutter/graphql_flutter.dart'; | |
class GraphQLClientConfig { | |
// JWT Token based GraphQL client | |
static Future<GraphQLClient> gqlClient(String token) async { | |
final HttpLink httpLink = HttpLink(AppConstants.GQL_HTTPS_URL); | |
final AuthLink authLink = AuthLink( | |
getToken: () async => 'Bearer $token', |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains hidden or 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'; | |
void main() { | |
// | |
// Initialize a "Broadcast" Stream controller of integers | |
// | |
final StreamController<int> ctrl = StreamController<int>.broadcast(); | |
// | |
// Initialize a single listener which filters out the off numbers and |
This file contains hidden or 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'; | |
void main() { | |
// | |
// Initialize a "Single-Subscription" Stream controller | |
// | |
final StreamController ctrl = StreamController(); | |
// | |
// Initialize a single listener which simply prints the data |
This file contains hidden or 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
<?php return array ( | |
'url' => 'https://xaviesteve.com/', | |
'content_type' => 'text/html; charset=UTF-8', | |
'http_code' => 200, | |
'header_size' => 578, | |
'request_size' => 229, | |
'filetime' => -1, | |
'ssl_verify_result' => 0, | |
'redirect_count' => 0, | |
'total_time' => 0.27407799999999999, |
This file contains hidden or 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
// start service | |
var SECONDS = 20; // every 10 seconds | |
var intent = Titanium.Android.createServiceIntent({ | |
url: 'logservice.js' | |
}); | |
intent.putExtra('interval', SECONDS * 1000); // Needs to be milliseconds | |
Titanium.Android.startService(intent); |
This file contains hidden or 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
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
This file contains hidden or 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
/** | |
* Calculates the physical display size for android devices | |
* e.g 4,95 for Nexus 5 or 7,02 for Nexus 7 | |
* | |
* IMPORTANT: this requires https://github.com/dbankier/HasMenu | |
* | |
* @return {Number} size as inches | |
*/ | |
function getPhysicalSize(){ | |
// some infos we need |
This file contains hidden or 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
//AUTOCOMPLETE TABLE | |
var table_data = []; | |
var last_search = null; | |
var timers = []; | |
// NOTE: iOS and Android keys will be different! | |
var IOS_API_KEY = 'xxx__APIKEY___xxx'; | |
var ANDROID_API_KEY = ''; |
This file contains hidden or 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
/*** | |
* Connects the blue box to the red box with touch and finger slide. | |
* The window's backgroundColor and the label's text give feedback to the user. | |
* ... the blue box is not going to move anywhere | |
* | |
* @Copyleft 2013 Patrick De Marta | |
* @License GNU GPL | |
*/ | |
/** |
NewerOlder