Skip to content

Instantly share code, notes, and snippets.

View imbhargav5's full-sized avatar

Bhargav Ponnapalli imbhargav5

View GitHub Profile
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@morhekil
morhekil / nginx.conf
Created August 14, 2014 12:18
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
@mmrko
mmrko / mocha-react-css-modules.js
Last active January 1, 2024 00:15
Mocha & React & CSS Modules with Sass
// setup.js
import hook from 'css-modules-require-hook'
import sass from 'node-sass'
hook({
extensions: [ '.scss' ],
preprocessCss: data => sass.renderSync({ data }).css
})
@djonsson
djonsson / install_elasticsearch_osx.md
Last active November 11, 2022 21:10
OS X installation instructions for Elasticsearch + Kibana + Marvel

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask

Prerequisites

If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@ikrauchanka
ikrauchanka / gist:ddc076308f1297e5a5e8c969a4df1c8e
Created May 29, 2016 18:38
golang return function in function
package main
import (
"fmt"
)
func makeFunction(name string) func() {
return func() {
fmt.Printf("Hello %s", name)
}
@physacco
physacco / resize_chrome.sh
Created July 7, 2016 02:39
Resize Google Chrome browser on Mac OS X
#!/bin/bash
osascript -e 'tell application "Google Chrome"' -e 'set bounds of front window to {1, 1, 1280, 640}' -e 'end tell'
@threepointone
threepointone / alternative.md
Last active July 31, 2022 17:46
list of things that don't do what they say they do

(also know as lies and/or alternative facts)

js

  • setImmediate - doesn't set anything immediately, waits for a tick before executing
  • setTimeout(fn, n) - never sets the timeout to exactly n
  • Math.random() - computers cannot generate random numbers
  • Promise - is a lie when rejected
  • Array.reduce - accumulates, does not reduce (via @sbmadhav)
@siddharthkp
siddharthkp / reactivconf-2017-proposal.md
Last active February 25, 2024 10:06
Building applications for the next billion users