Skip to content

Instantly share code, notes, and snippets.

View joshuachinemezu's full-sized avatar

Joshua Chinemezu joshuachinemezu

View GitHub Profile
@bmaupin
bmaupin / free-database-hosting.md
Last active February 28, 2025 20:16
Free database hosting
@gaearon
gaearon / modern_js.md
Last active February 12, 2025 21:09
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@joshuachinemezu
joshuachinemezu / app.js
Created February 15, 2018 01:05 — forked from verticalgrain/app.js
React Router V4 Redirect after form submission
import React, { Component } from 'react'
import { Redirect } from 'react-router'
export default class ContactForm extends Component {
constructor () {
super();
this.state = {
fireRedirect: false
}
}
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image
} from 'react-native';
import { StackNavigator,TabNavigator,TabBarBottom,TabBarTop } from "react-navigation";
import Icon from 'react-native-vector-icons/FontAwesome';
@dipakcg
dipakcg / export.php
Created December 1, 2016 15:08
Export MySQL to Excel (.xls) using PHP
<?php
/***** EDIT BELOW LINES *****/
$DB_Server = "localhost"; // MySQL Server
$DB_Username = "username"; // MySQL Username
$DB_Password = "password"; // MySQL Password
$DB_DBName = "databasename"; // MySQL Database Name
$DB_TBLName = "tablename"; // MySQL Table Name
$xls_filename = 'export_'.date('Y-m-d').'.xls'; // Define Excel (.xls) file name
/***** DO NOT EDIT BELOW LINES *****/
@juampynr
juampynr / guzzle_post.php
Last active May 1, 2023 19:52
Sample POST request with Guzzle
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'http://example.com',
]);
@andrey-skl
andrey-skl / Readme.md
Last active October 9, 2019 13:42
How to compile and run react-native application from terminal

To run on ios:

  1. Install XCode (recommended) or XCode command line tools by xcode-select --install
  2. Into XCode settings, go to "Downloads" tab and download iOS 9.2 emulator
  3. Compile native app and run it on simulator via npm run ios

To run on Android:

  1. Set up Android environment
  2. Create emulator via npm run android-emulator-create
  3. Run emulator via npm run android-emulator
  4. Compile native code and run it on emulator via npm run android
@marty-wang
marty-wang / gist:5a71e9d0a6a2c6d6263c
Last active June 27, 2024 13:34
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@m0n01d
m0n01d / Full Stack JavaScript.md
Last active September 30, 2021 00:22 — forked from royshouvik/Full Stack JavaScript.md
Learn Full Stack JavaScript Web Development for FREE using resources like YouTube, Udacity and NodeSchool