Skip to content

Instantly share code, notes, and snippets.

View robinmitra's full-sized avatar
👋
h3110 w0r1d

Robin Mitra robinmitra

👋
h3110 w0r1d
View GitHub Profile
@robinmitra
robinmitra / main.dart
Created July 8, 2019 08:12
Learning 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);
# initialization file (not found)
@robinmitra
robinmitra / post-comment-on-pull-requests.sh
Last active May 9, 2019 16:22
Post comment on multiple Pull Requests
#!/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
### 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 March 31, 2018 15:40
Homebrew packages and casks for setting up a development machine running MacOS
############
# Packages #
############
brew install tree
brew install nvm
brew install fzf
brew install highlight
#########
@robinmitra
robinmitra / Show History.sh
Created March 31, 2018 15:10
Show a range of items from history
# Syntax
history <start> <end>
# Show all items in history
history 1
@robinmitra
robinmitra / History Statistics.sh
Last active March 31, 2018 14:26
Show ten most used commands from history
# Show ten most used commands from history
history-stat
@robinmitra
robinmitra / basic-implementation.php
Last active August 29, 2015 14:21
Singleton Pattern
<?php
class Singleton
{
/**
* @var self Single instance
*/
private static $instance = null;
/**
@robinmitra
robinmitra / laravel-generators.sh
Created April 13, 2014 10:33
Cheatsheet for Jeffrey Way's Laravel Generators
## 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 February 22, 2014 18:03 — forked from jookyboi/python_resources.md
Python-related modules and guides.

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