I hereby claim:
- I am benoitduffez on github.
- I am bduffez (https://keybase.io/bduffez) on keybase.
- I have a public key ASCGN0rZCXTbxEmeZTl7PnO9UFjMJpE-SrwMk4Zny0WxUQo
To claim this, I am signing this object:
#!/bin/bash | |
# Clean up on exit | |
function finish { | |
rm -f expected found | |
} | |
trap finish EXIT | |
# How to parse JSON | |
JQ="jq --sort-keys" |
import 'package:flutter_test/flutter_test.dart'; | |
extension Let<T extends Object> on T? { | |
R let<R>(R Function(T) callback, {R Function()? or}) { | |
var self = this; | |
if (self != null) { | |
return callback(self); | |
} | |
if (or != null) { | |
return or(); |
O let<I extends Object, O>( | |
I? value, | |
O Function(I) cb, | |
{O Function()? or}) { | |
if (value != null) { | |
return cb(value); | |
} | |
if (or != null) { | |
return or(); | |
} |
/** | |
* This Google Sheets script keeps data in the specified column sorted any time | |
* the data changes. | |
* | |
* After much research, there wasn't an easy way to automatically keep a column | |
* sorted in Google Sheets, and creating a second sheet to act as a "view" to | |
* my primary one in order to achieve that was not an option. Instead, I | |
* created a script that watches for when a cell is edited and triggers | |
* an auto sort. | |
* |
I hereby claim:
To claim this, I am signing this object:
CREATE TABLE `agency` ( | |
transit_system VARCHAR(50) NOT NULL, | |
agency_id VARCHAR(100), | |
agency_name VARCHAR(255) NOT NULL, | |
agency_url VARCHAR(255) NOT NULL, | |
agency_timezone VARCHAR(100) NOT NULL, | |
agency_lang VARCHAR(100), | |
agency_phone VARCHAR(100), | |
agency_fare_url VARCHAR(100), | |
PRIMARY KEY (agency_id) |
// ==UserScript== | |
// @name SelfServicePlus | |
// @namespace SelfServicePlus | |
// @match http://astsih/SelfService/* | |
// @version v1.0 | |
// ==/UserScript== | |
// a function that loads jQuery and calls a callback function when jQuery has finished loading | |
function loadJQuery(callback) { | |
var script = document.createElement("script"); |
public class ViewPagerFragment extends Fragment { | |
private MyTabsAdapter mAdapter; | |
private static final int NB_TABS = 2; // to change with what you need | |
private static final String[] TAB_TITLES = new String[NB_TABS]; | |
public static ViewPagerFragment newInstance(final Bundle args) { | |
final ViewPagerFragment f = new ViewPagerFragment(); | |
f.setArguments(args); | |
return f; | |
} |
#!/bin/sh | |
MYSQL="mysql" # add -u xyz -pabcd or export MYSQL_PWD, etc | |
echo "Init" | |
$MYSQL -e "drop database if exists test" | |
$MYSQL -e "create database test" | |
$MYSQL test -e 'delimiter $$ | |
create function func() returns int(10) | |
begin |
#!/bin/bash | |
. mysql.ini | |
schema_url="https://raw.githubusercontent.com/mauryquijada/gtfs-mysql/master/gtfs-sql.sql" | |
mysqlexec="mysql -h $host -u $user -p${pass} $name" | |
datafolder="./data" | |
provider_url="http://www.data.gouv.fr/en/dataset/offre-transport-de-la-ratp-format-gtfs-ratp" | |
# List files that are available from the provider | |
files=`curl -s $provider_url | egrep -o 'data-url="[^"]+"' | awk -F\" '{print $2}'` |