Skip to content

Instantly share code, notes, and snippets.

🚢
coding

Tanvir Raj tanvirraj

Block or report user

Report or block tanvirraj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tanvirraj
tanvirraj / 1.md
Created May 12, 2019 — forked from sw-yx/1.md
Learn In Public - 7 opinions for your tech career
View 1.md

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos or Twitch streams. Start a newsletter. Draw cartoons (people loooove cartoons!). Whatever your thing is, make the thing you wish you had found when you were learning. Don't judge your results by "claps" or retweets or stars or upvotes - just talk to yourself from 3 months ago. I keep an almost-daily dev blog written for no one else but me.

Guess what? It

View test.js
// @flow
import React, { PureComponent } from "react";
import styles from "./MerchantCatalogScreen.module.scss";
import { connect } from "react-redux";
import { List, Modal, message } from "antd";
import { select } from "../../../../store/store";
import { withNamespaces } from "react-i18next";
import BrowserMeta, {
Themes
View redux
// There area lot more checks in the Redux lib but this gets the point across.
function createStore(reducer, initialState) {
let currentState = initialState;
const listeners = [];
function getState() {
return currentState;
}
function subscribe(listener) {
View gist:87f342d2a8daefcce460f9cbb55afa80
{
"editor.fontFamily": "Dank Mono", //"Operator Mono",
"editor.fontSize": 16,
"editor.fontLigatures": true,
"window.zoomLevel": 1,
"editor.minimap.enabled": false,
// Controls the cursor style, accepted values are 'block', 'line' and 'underline'
// Set the default
"editor.formatOnSave": true,
View auth.post
// axios
// .post(baseURL + '/auth/local/register', {
// username: username,
// email: email,
// password: password
// })
// .then(response => {
// window.localStorage.setItem('jwt', response.data.jwt);
// if (response.statusText === 'OK') {
// this.setState(() => ({
View auth.html
<div className="signin-form">
<form onSubmit={this.handleSubmit}>
<div className="form-group">
<input
type="text"
className="form-control"
value={this.state.username}
onChange={this.handleUsername}
/>
View track-my-mac
#!/usr/bin/python
#
# trackmac.py
#
# A simple time tracker for Mac OS X by Nat Friedman (nat@nat.org).
#
# Written May 6, 2010 in Munich, while a soft rain fell.
#
# Run this script in a terminal. It displays activity statistics
# from the last 24 hours, like this:
View vscode setup
{
"editor.fontFamily": "Dank Mono", //"Operator Mono",
"editor.fontSize": 16,
"editor.fontLigatures": true,
"window.zoomLevel": 1,
"editor.minimap.enabled": false,
// Controls the cursor style, accepted values are 'block', 'line' and 'underline'
// Set the default
"editor.formatOnSave": true,
// Enable per-language
@tanvirraj
tanvirraj / python_decorator_guide.md
Created May 20, 2018 — forked from Zearin/python_decorator_guide.md
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)
View python_decorator_guide.md

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

View facedata.js
[
{
id: 1,
projectName: "something",
startDate: "01-01-2018",
proposedEndDate: "01-01-2018",
durations: {
month: 5,
MM: 10,
MD: 300,
You can’t perform that action at this time.