Skip to content

Instantly share code, notes, and snippets.

@yashkumarsharma
yashkumarsharma / MobileDrawer.js
Last active December 12, 2023 11:02
Demo - Hide Drawer Item (Drawer Navigator | React -navigation)
import React from 'react';
import {
SafeAreaView,
StyleSheet,
Text,
} from 'react-native';
import {
CommonActions,
DrawerActions,
useLinkBuilder,

Git & Github

Version control is a project's best source of documentation when done correctly. When trying to understand code it's extremely useful to use git blame to find both the PR and the issue associated with that change.

PRs should be small and focused. Each commit should solve a single problem and be covered by a test that exemplifies that particular feature or fix.

All PRs must be reviewed by a teammate before they are eligle to be merged into the master branch. Large PRs are difficult to review. Be sure to break large PRs into smaller ones so that they can be reviewed quickly and deployed to production.

  • Never commit passwords, access tokens, or other credentials into version control. If you think you absolutely have to, ask first. If you do this by accident, tell someone immediately.
  • Each commit should be as small and as simple as possible.
@yashkumarsharma
yashkumarsharma / db-far.php
Created November 2, 2017 10:38 — forked from KLicheR/db-far.php
PHP script that perform a find and replace in a database dump (tested with MySQL) with adjustments of the PHP serialize founded.
#!/usr/bin/php
<?php
/**
* PHP script that perform a find and replace in a database dump (tested with
* MySQL) with adjustments of the PHP serialize founded.
*
* Don't forget to escape your "special characters":
* "a$b" -> "a\$b"
* "a"b" -> "a\"b"
* "a`b" -> "a\`b"