Skip to content

Instantly share code, notes, and snippets.

View softmentor's full-sized avatar

Jiny Thattil softmentor

  • Bangalore, India
View GitHub Profile
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------
@sumanmukherjee03
sumanmukherjee03 / cipher_encryption_decryption.go
Last active May 5, 2021 11:27
AES GCM example in python and go
package main
import (
"crypto/aes"
"crypto/cipher"
"fmt"
"reflect"
"strconv"
"time"
)
@datchley
datchley / react-redux-style-guide.md
Last active February 13, 2024 14:30
React + Redux Style Guide
@milmazz
milmazz / imposter-handbook-links.md
Last active April 1, 2024 10:31
Useful links found in The Imposter's Handbook by Rob Conery
@mshick
mshick / install.sh
Last active April 2, 2020 10:01
Installing Node.js with Homebrew and nvm
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install nvm
brew install nvm
# Export nvm environment
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
@vasanthk
vasanthk / System Design.md
Last active July 19, 2024 08:25
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
#include<cmath>
#include<iostream>
#include<climits>
using namespace std;
int Max_Subarray_Sum(int arr[],int n)
{
if(n==1)
{
return arr[0];
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active July 14, 2024 15:27
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 4, 2024 04:16
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@pcmanus
pcmanus / BatchInsertTest.java
Created February 19, 2014 18:28
Simplistic benchmark for CASSANDRA-6737
package batchInsertTest;
import com.datastax.driver.core.*;
public class BatchInsertTest {
public static void main(String[] args) throws Exception {
int RUN = 20;
int PER_BATCH_INSERTS = 10000;