Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
h3110 w0r1d

Robin Mitra robinmitra

👋
h3110 w0r1d
View GitHub Profile
View main.dart
class Deck {
List<Card> cards = [];
Deck() {
var ranks = ['Ace', 'Two', 'Three', 'Four'];
var suits = ['Diamonds', 'Hearts', 'Clubs', 'Spades'];
for (var suit in suits) {
for (var rank in ranks) {
var card = Card(rank: rank, suit: suit);
this.cards.add(card);
View init.coffee
# initialization file (not found)
@robinmitra
robinmitra / post-comment-on-pull-requests.sh
Last active May 9, 2019
Post comment on multiple Pull Requests
View post-comment-on-pull-requests.sh
#!/usr/bin/env bash
GITHUB_USERNAME=<username>
GITHUB_ACCESS_TOKEN=<access-token>
REPO_URL=https://api.github.com/repos/<repo-owner>/<repo>
PR_BASE_URL=${REPO_URL}/pulls
COMMENT_BASE_URL=${REPO_URL}/issues
View gist:845823453ab9dc61cc5fb946a2326da2
### Keybase proof
I hereby claim:
* I am robinmitra on github.
* I am robinmitra (https://keybase.io/robinmitra) on keybase.
* I have a public key ASCodCcll-pjzpklJKdlVMWRqYuG2yHNA7yLtZmAP-ETVwo
To claim this, I am signing this object:
@robinmitra
robinmitra / MacOS Applications for Development.sh
Created Mar 31, 2018
Homebrew packages and casks for setting up a development machine running MacOS
View MacOS Applications for Development.sh
############
# Packages #
############
brew install tree
brew install nvm
brew install fzf
brew install highlight
#########
@robinmitra
robinmitra / Show History.sh
Created Mar 31, 2018
Show a range of items from history
View Show History.sh
# Syntax
history <start> <end>
# Show all items in history
history 1
@robinmitra
robinmitra / History Statistics.sh
Last active Mar 31, 2018
Show ten most used commands from history
View History Statistics.sh
# Show ten most used commands from history
history-stat
View basic-implementation.php
<?php
class Singleton
{
/**
* @var self Single instance
*/
private static $instance = null;
/**
@robinmitra
robinmitra / laravel-generators.sh
Created Apr 13, 2014
Cheatsheet for Jeffrey Way's Laravel Generators
View laravel-generators.sh
## Migration
# Create a migration to create a table named 'posts'
php artisan generate:migration create_posts_table
# Create a migration to add a field named 'user_id' to the 'posts' table
php artisan generate:migration add_user_id_to_posts_table
# Create a migration to remove the 'user_id' field we just created
php artisan generate:reomve_user_id_from_posts_table
@robinmitra
robinmitra / python_resources.md
Created Feb 22, 2014 — forked from jookyboi/python_resources.md
Python-related modules and guides.
View python_resources.md

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides