Skip to content

Instantly share code, notes, and snippets.

View darklight721's full-sized avatar
👨‍💻

Roy Evan Sia darklight721

👨‍💻
  • Cebu City, Philippines
  • X @pr00t
View GitHub Profile
{
"parser": "babel-eslint",
"rules": {
// best practices
"curly": [2, "multi-line"],
"dot-notation": 2,
"dot-location": [2, "property"],
"eqeqeq": [2, "allow-null"],
"guard-for-in": 2,
"no-caller": 2,
# Motion commands
h - move left
j - move down
k - move up
l - move right
w - move to next word
b - move to beginning of word
e - move to end of word
@darklight721
darklight721 / AdMobBanner.h
Last active March 31, 2016 19:33
Using AdMob in React Native [see my comment below for instructions]
#ifndef AdMobBanner_h
#define AdMobBanner_h
@import GoogleMobileAds;
@interface AdMobBanner : GADBannerView
@property NSArray *testDevices;
@end
function sumf(n) {
let sum = 0;
for (let i = n; i > 0; i--) {
sum += i * (n - i + 1);
}
return sum;
}
@darklight721
darklight721 / Result.js
Created June 16, 2016 14:21
Here's a sample react native code from my app.
import React, { Component, StyleSheet, View } from 'react-native';
import Text from '../components/Text';
import Icon from '../components/Icon';
import Button from '../components/Button';
import AdMobBanner from '../components/AdMobBanner';
import Analytics from 'react-native-google-analytics-bridge';
import { openUrl, wikiUrl, mapsUrl } from '../utils/urls';
import { connect } from 'react-redux';
import { nextLevel, getRegion } from '../actions';
import { PRIMARY_DARKER } from '../utils/colors';
@darklight721
darklight721 / .bash_profile
Created July 12, 2016 08:02
Some git commands
gitr() {
local branch=`git branch | sed -n '/\* /s///p'`
local stashed=`git stash`
git fetch
git reset --hard origin/"$branch"
if [[ "$stashed" != "No local changes to save" ]]; then
git stash pop
fi
}
@darklight721
darklight721 / INSTRUCTIONS.md
Last active December 7, 2020 12:57
Using MobX with decorators in React Native

Using MobX with decorators in React Native

The following instructions should work with React Native v0.32:

  1. Install mobx libraries.

    npm install mobx --save
    npm install mobx-react --save