Skip to content

Instantly share code, notes, and snippets.

View filipproch's full-sized avatar
:shipit:
RobotHub to the moon

Filip Prochazka filipproch

:shipit:
RobotHub to the moon
View GitHub Profile
@filipproch
filipproch / Hooked.java
Created January 28, 2012 11:59 — forked from nijikokun/Hooked.java
Hooking support for plugins, not just iConomy.
/**
* Hooked.java
* <br><br>
* Controls custom hook information by easily helping you figure out what is what without recieving errors on the matter.
*
* @author Nijikokun <nijikokun@gmail.com>
*/
public class Hooked {
public Hooked() {
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@filipproch
filipproch / designer.html
Created November 30, 2014 13:45
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@filipproch
filipproch / gist:7d29ac95c324ec132396
Created January 24, 2015 17:59
[ANDROID] - Record audio to ByteBuffer
class AudioRecordThread implements Runnable {
@Override
public void run() {
int bufferLength = 0;
int bufferSize;
short[] audioData;
int bufferReadResult;
try {
bufferSize = AudioRecord.getMinBufferSize(sampleAudioBitRate,
@filipproch
filipproch / build.gradle
Last active May 13, 2020 22:23
With Archon installed, this way you can debug your Android app without slow bad emulator
task runChromeAppDebug(type: Exec) {
executable "bash"
args "--login", "-c", "google-chrome --load-and-launch-app=${projectDir}/${android.defaultConfig.applicationId}.android"
}
task copyChromeAppDebug(type: Copy) {
from "${buildDir}/outputs/apk/${project.name}-debug.apk"
into "${projectDir}/${android.defaultConfig.applicationId}.android/vendor/chromium/crx/"
}
public void sendRequests() {
new DataSender().execute();
}
public static class DataSender extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
db=openOrCreateDatabase("StudentDB", Context.MODE_PRIVATE, null);
Cursor c=db.rawQuery("SELECT * FROM student", null);
#!/bin/sh
java -Xms512M -Xmx1024M -XX:MaxPermSize=128M -jar spigot.jar
@filipproch
filipproch / testobjects.cpp
Created June 17, 2016 06:04
test creating objects in c++
//
// Created by Filip Prochazka (@filipproch)
//
#include <jni.h>
#ifdef __cplusplus
extern "C"
{
#endif
// AsrSessionOperator.kt
// nova metoda
fun setSensitivityLevel(newLevel: Float): Observable<CommandResponse> {
val bundle = Bundle()
bundle.putFloat(AsrControlCommand.EXTRA_SENSITIVITY, newLevel)
val cmd = AsrControlCommand(AsrControlCommand.CMD_UPDATE_SENSITIVITY_LEVEL, bundle)
return AsrServiceConnection.operator.sendAsrControlCommand(cmd)
}
@filipproch
filipproch / build.gradle
Last active March 18, 2018 17:57
Dagger example
dependencies {
implementation 'com.google.dagger:dagger-android:2.x'
implementation 'com.google.dagger:dagger-android-support:2.x' // if you use the support libraries
annotationProcessor 'com.google.dagger:dagger-android-processor:2.x'
}