Skip to content

Instantly share code, notes, and snippets.

View nerandell's full-sized avatar
:shipit:

Ankit Chandawala nerandell

:shipit:
View GitHub Profile
@nerandell
nerandell / code-review-checklist.md
Last active January 9, 2024 15:03
PHP Code Review Guidelines

Make sure these boxes are checked before submitting/approving the PR

General

  • The code works
  • The code is easy to understand
  • Follows coding conventions
  • Names are simple and if possible short
  • Names are spelt correctly
  • Names contain units where applicable
  • There are no usages of magic numbers
@nerandell
nerandell / ankitchandawala.zsh-theme
Created July 1, 2022 10:19
Customized zsh theme
PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
export default class App extends Component {
constructor(props) {
super(props);
this.toggleVisibility = this.toggleVisibility.bind(this);
this.state = {
isSecretVisible: false
};
}
toggleVisibility() {
@nerandell
nerandell / detox_sample_app.js
Last active March 5, 2019 17:58
Sample component for detox testing
export default class App extends Component {
constructor(props) {
super(props);
this.toggleVisibility = this.toggleVisibility.bind(this);
this.state = {
isSecretVisible: false
};
}
toggleVisibility() {
{
"query": {
"bool": {
"should": [
{
"function_score": {
"query": {
"bool": {
"must": [
{
@nerandell
nerandell / socket_connector.py
Created October 6, 2016 06:23
Socket connector
'''
This is a minimal python chat client which connects to the `rooms:lobby` topic.
The server is supposed to be
http://www.phoenixframework.org/docs/channels#section-tying-it-all-together
'''
from __future__ import print_function
try: # py2
get_user_input = raw_input
@nerandell
nerandell / BuildPoeticAPIs.md
Last active January 28, 2016 06:46
Build Poetic APIs

Build Poetic APIs

Steps to follow

  • Architecture Astrautics
    • Inventing rather than extracting - Don't invent a libray, extract it out.
  • Consistency
    • Think like a wise man, speak in the language of common men
    • Don't be syntactically clever.
    • Warning Signs
      • Frequent references to your own docs and source