Skip to content

Instantly share code, notes, and snippets.

Avatar

TurhanOz TurhanOz

View GitHub Profile
@TurhanOz
TurhanOz / PURE java project, using AndroidStudio IDE
Last active May 28, 2018
PURE java project, using AndroidStudio IDE
View PURE java project, using AndroidStudio IDE
gradle init --type java-application
View Simple Boostrap landing Page
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Islamophobe - définition & solution</title>
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
@TurhanOz
TurhanOz / screenrecord.sh
Created Dec 11, 2016 — forked from tasomaniac/screenrecord.sh
Screen Record for Android
View screenrecord.sh
#!/bin/sh
set -e
if [ -z "$1" ]; then
shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4
else
shot_path="$*"
fi
View Get SUM of counts for an event
public static void trackItemsSelectedCount(Context context, int count) {
Bundle bundle = new Bundle();
bundle.putInt("count", count);
getAnalytics(context).logEvent("items_selected", bundle);
}
SELECT
SUM((SELECT params.value.int_value FROM x.params WHERE params.key = 'count')) AS count
FROM package_ANDROID.app_events_20170123, UNNEST(event_dim) AS x
View EddystoneBleScanner.java
// Eddystone service UUID
private static final ParcelUuid UID_SERVICE =
ParcelUuid.fromString("0000feaa-0000-1000-8000-00805f9b34fb");
BluetoothManager manager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE);
BluetoothAdapter adapter = manager.getAdapter();
BluetoothLeScanner scanner = adapter.getBluetoothLeScanner();
ScanFilter beaconFilter = new ScanFilter.Builder()
.setServiceUuid(UID_SERVICE)
@TurhanOz
TurhanOz / test-expected-annotation-limit
Last active Aug 29, 2015
Square/Phrase/EnhanceTests
View test-expected-annotation-limit
@Test(expected = NullPointerException.class)
public void shouldThrowNullPointerException() throws Exception {
Foo foo = new Foo(null);
foo.bar(null);
}