- go to "Settings"
- select "Apps"
- show all Apps (menu "Show System")
- select the system app "Media Storage"
- select "Storage"
- Clear Cache and Clear Storage
- reboot phone and wait a while for Media Storage to index all your files again
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {View, TouchableOpacity, Text} from 'react-native'; | |
import t from 'tcomb-form-native'; | |
const Form = t.form.Form; | |
const Country = t.enums({ | |
"AD":"Andorra","AE":"United Arab Emirates","AF":"Afghanistan","AG":"Antigua and Barbuda","AI":"Anguilla","AL":"Albania","AM":"Armenia","AO":"Angola","AQ":"Antarctica","AR":"Argentina","AS":"American Samoa","AT":"Austria","AU":"Australia","AW":"Aruba","AX":"Åland","AZ":"Azerbaijan","BA":"Bosnia and Herzegovina","BB":"Barbados","BD":"Bangladesh","BE":"Belgium","BF":"Burkina Faso","BG":"Bulgaria","BH":"Bahrain","BI":"Burundi","BJ":"Benin","BL":"Saint Barthélemy","BM":"Bermuda","BN":"Brunei","BO":"Bolivia","BQ":"Bonaire","BR":"Brazil","BS":"Bahamas","BT":"Bhutan","BV":"Bouvet Island","BW":"Botswana","BY":"Belarus","BZ":"Belize","CA":"Canada","CC":"Cocos [Keeling] Islands","CD":"Democratic Republic of the Congo","CF":"Central African Republic","CG":"Republic of the Congo","CH":"Switzerland","CI":"Ivory Coast","CK":"Cook Islands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install `dnsmasq` and configure for *.dev domains | |
$ brew install dnsmasq | |
$ vim /usr/local/etc/dnsmasq.conf | |
# Reload configuration and clear cache | |
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ dscacheutil -flushcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"code": "AF" | |
}, | |
{ | |
"name": "Aland Islands", | |
"dial_code": "+358", | |
"code": "AX" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// The STRIPE-supported currencies, sorted by code | |
export const currencies = [ | |
{ | |
'code':'AED', | |
'description':'United Arab Emirates Dirham' | |
}, | |
{ | |
'code':'AFN', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Getting Started. | |
# 1. Enter visual mode V, then use s/myapp/domain/g to replace all myapp to domain. | |
# 2. Change upstream port to PORT ENV variable defined in /etc/init.d/myapp | |
# hide server information | |
http { | |
server_tokens off; | |
} | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim ~/.bash_profile | |
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;} | |
source ~/.bash_profile | |
Tools & Stuffs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Define a state variable for showing/hiding the action-button | |
state = { | |
isActionButtonVisible: true | |
} | |
// 2. Define a variable that will keep track of the current scroll position | |
_listViewOffset = 0 | |
// 3. Add an onScroll listener to your listview/scrollview | |
<ListView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define all your icons once, | |
// load them once, | |
// and use everywhere | |
import Ionicons from 'react-native-vector-icons/Ionicons'; | |
import FontAwesome from 'react-native-vector-icons/FontAwesome'; | |
// define your suffixes by yourself.. | |
// here we use active, big, small, very-big.. | |
const replaceSuffixPattern = /--(active|big|small|very-big)/g; |
I use git a lot for work and other projects, so I invested the time in creating some high quality aliases that really work for me. These just go in your bash profile (~/.bash_profile or ~/.bashrc or ~/.profile depending on your OS).
I see a lot of people go overboard with aliases, and then end up not using them. They're meant to cover 95% of the commands I use, not 100%.
alias gcam='git commit -am'
alias gs='git status'
alias gplr='git pull --rebase'
alias gpsh='git push'
alias gpo='git push -u origin `git symbolic-ref --short HEAD`'
OlderNewer