Skip to content

Instantly share code, notes, and snippets.

View r0b0t3d's full-sized avatar
🏠
Working from home

Tuan Luong r0b0t3d

🏠
Working from home
View GitHub Profile
@millermedeiros
millermedeiros / example.js
Last active September 10, 2022 03:06
execute multiple shell commands in series on node.js
// USAGE ------
// ============
var shell = require('./shellHelper');
// execute a single shell command
shell.exec('npm test --coverage', function(err){
console.log('executed test');
}});
@broady
broady / 1MarkerAnimation.java
Last active August 19, 2024 12:30
Animating Markers
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@turowicz
turowicz / swift-json-class.md
Last active February 21, 2017 07:00
Apple Swift strong type object serialization to JSON
@hjerpbakk
hjerpbakk / BindablePicker.cs
Created July 17, 2014 19:26
A Picker-control for Xamarin.Forms which enables data binding through an ItemsSource and the SelectedItem.
using System;
using Xamarin.Forms;
using System.Collections;
namespace YourNamespace.Views.Controls {
public class BindablePicker : Picker
{
public BindablePicker()
{
this.SelectedIndexChanged += OnSelectedIndexChanged;
// Created by Ullrich Schäfer on 16/08/14.
// Updated to Swift 1.1 and CocoaLumberjack beta4 by Stan Serebryakov on 24/10/14
import Foundation
extension DDLog {
private struct State {
static var logLevel: DDLogLevel = .Error
static var logAsync: Bool = true
@imminent
imminent / MapMarkerBounce.java
Created June 16, 2015 23:44
Makes a Android Google Maps marker animate a bounce
import android.os.Handler;
import android.os.SystemClock;
import android.view.animation.BounceInterpolator;
import android.view.animation.Interpolator;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.Marker;
/**
* Performs a bounce animation on a {@link Marker} when it is clicked.
@Bhavdip
Bhavdip / sketch-never-ending.md
Created October 6, 2016 15:53
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@artemisia-absynthium
artemisia-absynthium / AndroidManifest.xml
Last active November 19, 2022 10:34
Android Exoplayer fullscreen feature
...
<activity
android:name=".FullscreenVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme" />
...
@pie6k
pie6k / useShareForwardedRef.tsx
Created October 23, 2019 10:02
forwardRef hook
import React, { useRef, forwardRef, Ref, useEffect } from 'react';
import { TextInputProps, TextInput } from 'react-native';
import styled from 'styled-components/native';
interface Props extends TextInputProps {
showEditLabel?: boolean;
}
const Input = styled.TextInput``;
@hirbod
hirbod / LeanText.tsx
Last active November 17, 2024 02:19
React Native LeanView and LeanText component
import { type ComponentType, createElement, forwardRef } from 'react'
import type { TextProps } from 'react-native'
// uncomment for NativeWind support
//import { cssInterop } from 'nativewind'
const LeanText = forwardRef((props, ref) => {
return createElement('RCTText', { ...props, ref })
}) as ComponentType<TextProps>