Skip to content

Instantly share code, notes, and snippets.

View adipascu's full-sized avatar
👾
TW1oaHBoISBNTUhIUEghISE=

Adrian Pascu adipascu

👾
TW1oaHBoISBNTUhIUEghISE=
View GitHub Profile
@adipascu
adipascu / gist:d614bf6888b66ca124798b8c079b229b
Created September 11, 2023 22:33
Salsa 2 group description
We are here to party and share information about about salsa/bachata social events!
What to post:
+ Free social events & meetups (super ok)
+ Paid entry social events (ok)
- Free courses (prefer to avoid)
- Paid courses (please avoid)
Courses are a great way to learn! Here is a list of them: https://bit.ly/3NPohXq
/*
This fixes issues with:
- devices that incorrectly state they support hover (Samsung Galaxy Note 9, SM-N960F, Android 8.1, Chrome 73)
- devices that do not support media queries for hover, but they are enabled by default in Material-UI
*/
export default {
onProcessStyle(style, rule) {
if (rule.type !== 'style') return style;
let newProps = [];
0x0034032F5A120002439bC4346a8d418Af902169F
{
"APIVersion": "5747657",
"Id": 14077,
"Name": "Toma",
"Latitude": 50.069373,
"Longitude": 15.898114,
"Sections": [{
"Id": 9313,
"Name": "Parter",
"Scale": 100.00000,
org.gradle.daemon=true
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.java.home=/usr/lib/jvm/java-8-oracle/
//example URL: vanillanav:navigateTo?venueId=8037&referenceId=19144
public func navigate(venueId: Int, destinationId: Int) -> Bool {
let navigateUrl = NSURL(string: "vanillanav:navigateTo?venueId=\(venueId)&referenceId=\(destinationId)")!
let sharedApp = UIApplication.sharedApplication()
if sharedApp.canOpenURL(navigateUrl) {
sharedApp.openURL(navigateUrl)
return true
} else {
let storeUrl = NSURL(string: "itms-apps://itunes.apple.com/ro/app/vanillanav/id1007116984")!
sharedApp.openURL(storeUrl)
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
public class VanillaNav {
/**
* Show the navigation screen for a location
*
* @param context used to call {@link Context#startActivity(Intent)}
@adipascu
adipascu / .gitignore
Created November 14, 2015 14:00
Android gitignore
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
.addCallAdapterFactory(new CallAdapter.Factory() {
//relevant SO: https://github.com/square/retrofit/pull/1117
RxJavaCallAdapterFactory delegate = RxJavaCallAdapterFactory.create();
@Override
public CallAdapter<?> get(Type returnType, Annotation[] annotations, Retrofit retrofit) {
//noinspection unchecked
CallAdapter<Observable<?>> delegate2 = (CallAdapter<Observable<?>>) delegate.get(returnType, annotations, retrofit);
return new CallAdapter<Object>() {
@Override
@adipascu
adipascu / gist:a1004cb49c5028a3acaa
Created September 24, 2015 09:50
Facebook api key
// Add code to print out the key hash
try {
PackageInfo info = context.getPackageManager().getPackageInfo(
BuildConfig.APPLICATION_ID,
PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}