Skip to content

Instantly share code, notes, and snippets.

View vishwakarma's full-sized avatar
🎯
Code like a maniac

Gopi Vishwakarma vishwakarma

🎯
Code like a maniac
View GitHub Profile
#Do not copy&paste whole file, find only interesting parts!
#HTTP authentification
AuthType Basic
AuthName "Log in"
AuthUserFile /path/to/.htpasswd
Require valid-user
#Security headers
@satishkaushik
satishkaushik / .rmvrc
Last active October 5, 2017 07:13
rvmrc
#!/bin/bash
if [ -e '.rvmrc_custom' ]; then
source .rvmrc_custom;
else
rvm --create use ruby-2.4.1@greatlearning;
fi
@vasanthk
vasanthk / System Design.md
Last active May 8, 2024 22:55
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?
@roydq
roydq / ubuntu_unattended_upgrades_gmail.markdown
Last active February 2, 2024 17:01 — forked from dwilkie/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

@alexrios
alexrios / NearbyWords.java
Created November 25, 2014 20:43
Facebook's How to Crush Your Coding Interview. Problem: Write a function that given a string, returns all nearby words. You are given the following helper functions: Set<String> getNearbyChars(char c); isWord(String word);
package facebook;
import java.util.HashSet;
import java.util.Set;
/**
* The complexity of that algorithm is O(n^m), where:
* n - the length of a string.
* m - number of permutations.
*/
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 7, 2024 17:37
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!






\

@bufke
bufke / document_to_text.py
Last active May 28, 2023 13:31
Convert odt, doc, docx, pdf to text with python and some linux programs. Doesn't require Libreoffice.
from subprocess import Popen, PIPE
from docx import opendocx, getdocumenttext
#http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from cStringIO import StringIO
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@vparihar01
vparihar01 / nokogiri_libxml_homebrew_lion_installation.sh
Created June 25, 2013 07:01
How to fix: Nokogiri Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0. dlopen bundle.open. Using homebrew on lion to install nokogiri and lixml
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
ERROR -: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2