Skip to content

Instantly share code, notes, and snippets.

View tenkunkyab's full-sized avatar

Tenzin Kunkyab tenkunkyab

View GitHub Profile
@tenkunkyab
tenkunkyab / BMContainer.js
Last active December 1, 2019 15:12
Fixes
import React, { Component } from "react";
import {
Container,
Button,
Modal,
Segment,
Icon,
Grid,
Divider,
Form,
@tenkunkyab
tenkunkyab / gist:d39b4b2514d69a9b35ae98b01fced79c
Last active November 14, 2018 04:27
Building React-Native Android Projects
react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
cd android/
./gradlew assembleDebug
* if this errors out temporary fix
** place `android.enableAapt2=false` in `gradle.properties` # no longer required
./gradlew assembleRelease
* generated apk located in `android/app/build/outputs/apk
** The builds are unsigned so you'd have to change the security settings on that phone.

Keybase proof

I hereby claim:

  • I am tenkunkyab on github.
  • I am tkunkyab (https://keybase.io/tkunkyab) on keybase.
  • I have a public key ASA-wyW-r-jKCWXHrGtZZxHTzyuh2iNe2KBnj4BRbc3qowo

To claim this, I am signing this object:

<input type="text" style="text-transform:uppercase"/>
<!-- transform the content of the input to uppercase automatically faster and easier than the following -->
<script>
$(input#id).keyup(function() {
this.value = this.value.toUpperCase();
});
</script>
$("#selectID option").each(function() {
if($(this).text() == 'TextToCompare') {
$(this).attr('selected', 'selected');
}
});
<?php
$begin = new DateTime( '2015-08-01' );
$end = new DateTime( '2015-08-31' );
// this way the last date is not missed in the foreach loop
$end = $end->modify( '+1 day' );
$interval = new DateInterval('P1D');
$daterange = new DatePeriod($begin, $interval ,$end);