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
# Alias for building and running robocop tests: | |
# robocop <test> | |
function robocop_test { | |
./mach build build/mobile/robocop | |
./mach robocop $1 | |
} | |
alias robocop=robocop_test |
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
#!/usr/bin/ruby | |
# Brainfuck Interpreter | |
# (C) Sebastian Kaspari 2009 | |
# Usage: bf2 [FILE] | |
require 'rubygems' | |
require "highline/system_extensions" | |
include HighLine::SystemExtensions | |
code = ARGF.read # code |
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
#!/usr/bin/ruby1.9.1 | |
# Brainfuck Interpreter | |
# (C) Sebastian Kaspari 2009 | |
# Usage: bf4 [FILE] | |
# This code is much much faster than the last one, which did | |
# a lot of unnecessary loops which could also lead to bugs | |
# | |
# There's now a bracket map which stores starting and ending | |
# brackets for direct "jumps", that should speed up things too |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<scheme name="netbeans_php_colors" version="1" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.0" /> | |
<option name="EDITOR_FONT_SIZE" value="12" /> | |
<option name="EDITOR_FONT_NAME" value="Monospaced" /> | |
<colors /> | |
<attributes> | |
<option name="CUSTOM_LINE_COMMENT_ATTRIBUTES"> | |
<value> | |
<option name="FOREGROUND" value="808080" /> |
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
Permissions | |
.from(context) | |
.withPermissions(Manifest.permission.ACCESS_FINE_LOCATION) | |
.onUIThread() | |
.andFallback(() -> doSomethingIfPermissionsHasNotBeenGranted()) | |
.run(() -> doSomethingWithPermission()); |
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
// Granting a single permission to an app | |
adb shell pm grant <package> android.permission.<permission> | |
// Install the APK with all runtime permissions granted automatically: | |
adb install -g <apk> |
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
package org.yaaic.deckster; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.Display; | |
import android.view.KeyEvent; | |
import android.view.View; | |
import android.widget.AdapterView; | |
import android.widget.Gallery; |
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
############################################################## | |
# Build Firefox for Android ################################## | |
############################################################## | |
ac_add_options --enable-application=mobile/android | |
mk_add_options MOZ_OBJDIR=./objdir-frontend | |
# Artifact builds (Fox yeah!) | |
ac_add_options --enable-artifact-builds |
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
(android.permission-group.MESSAGES) android.permission.SEND_SMS dangerous | |
(android.permission-group.MESSAGES) android.permission.SEND_RESPOND_VIA_MESSAGE <unknown> | |
(android.permission-group.MESSAGES) android.permission.RECEIVE_SMS dangerous | |
(android.permission-group.MESSAGES) android.permission.RECEIVE_MMS dangerous | |
(android.permission-group.MESSAGES) android.permission.CARRIER_FILTER_SMS <unknown> | |
(android.permission-group.MESSAGES) android.permission.RECEIVE_EMERGENCY_BROADCAST <unknown> | |
(android.permission-group.MESSAGES) android.permission.READ_CELL_BROADCASTS dangerous | |
(android.permission-group.MESSAGES) android.permission.READ_SMS dangerous |
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
(function() { | |
let open = total = done = 0; | |
let collection = document.getElementsByClassName('task-progress-counts'); | |
for (let i = 0; i < collection.length; i++) { | |
let counts = collection[i].innerHTML.split(" of ").map((x) => parseInt(x)); | |
total += counts[1]; done += counts[0]; open += counts[1] - counts[0]; | |
} | |
alert("Total: " + total + "\nOpen: " + open + "\nDone: " + done); | |
})(); |
OlderNewer