Skip to content

Instantly share code, notes, and snippets.

View andorfermichael's full-sized avatar

Michael Andorfer andorfermichael

  • Salzburg, Austria, Europe
  • 16:47 (UTC +02:00)
View GitHub Profile
@rishitells
rishitells / Jest_GitLab_CI.md
Last active July 23, 2024 10:39
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
@nieldeokar
nieldeokar / AudioRecordThread.java
Last active May 29, 2024 09:14
Recording an Audio with .aac extension using AudioRecord android.
package com.nieldeokar.whatsappaudiorecorder.recorder;
import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
import android.media.MediaRecorder;
import android.os.Build;
import android.util.Log;
@kiok46
kiok46 / bridge.md
Last active February 16, 2022 08:15
Bridge React-Native and JS

Content of the Gist is from a talk by Peggy Rayzis at Chain React 2017: Chain React 2017: Breaking Down Bridging in React Native by Peggy Rayzis


In order for a native code to talk to JS you would need a bridge.

  • You need to integrate a third-party SDK.
  • High perfomance is crutial
  • You are building a brownfiel app
  • You need access to a platform to a platform API. (Camera, Gyroscope etc.), You will need to use a opensource library or create a bridge.
@EQuimper
EQuimper / clear.txt
Created June 16, 2017 16:17
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active June 28, 2024 20:49
React Native Bridging Cheatsheet
@mikesurowiec
mikesurowiec / AudioComponent.js
Created February 25, 2017 04:39
React Native Swift & Promises
import {
NativeModules,
} from 'react-native';
const { AudioManager } = NativeModules;
async function setPlaying (shouldPlay: boolean) => {
const isPlayingNativeResult = await AudioManager.setPlaying(shouldPlay);
// do something with the native result
}
@cojack
cojack / git-bump-version
Created February 8, 2017 15:01
Automatically bump version in package.json and commit it, merge to master, then create tag and push evrything to origin
bump_version () {
git fetch origin
git checkout develop
git pull origin develop
npm version patch --no-git-tag-version
VERSION=$(grep -m1 version package.json | awk -F: '{ print $2 }' | sed 's/[", ]//g')
git commit package.json -m "chore(package): Bump version up to $VERSION"
git push origin develop
git checkout master
git pull origin master
@kmark
kmark / AudioRecordActivity.java
Last active January 4, 2024 11:01
An example of how to read in raw PCM data from Android's AudioRecord API (microphone input, for instance) and output it to a valid WAV file. Tested on API 21/23 on Android and API 23 on Android Wear (modified activity) where AudioRecord is the only available audio recording API. MediaRecorder doesn't work. Compiles against min API 15 and probabl…
/*
* Copyright 2016 Kevin Mark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
//
// LocationRow.swift
// bicimapa
//
// Created by Yoann Lecuyer on 16/01/16.
// Copyright © 2016 Bicimapa. All rights reserved.
//
import UIKit
import Eureka