Skip to content

Instantly share code, notes, and snippets.

David Vasandani davidneudorfer

Block or report user

Report or block davidneudorfer

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
View notifications.tf
resource "aws_db_event_subscription" "default" {
name = "rds-event-sub-${var.environment}"
sns_topic = "${aws_sns_topic.default.arn}"
source_type = "db-instance"
source_ids = ["${aws_db_instance.main_rds_instance.id}"]
event_categories = [
"availability",
"deletion",
@davidneudorfer
davidneudorfer / pre-commit
Last active Apr 30, 2019 — forked from hraban/pre-commit
Git pre-commit hook (.git/hooks/pre-commit) to prevent accidentally committing debug code (add NOCOMMIT in source comment)
View pre-commit
#!/bin/sh
# This pre-commit hook will prevent you from committing any line (or filename) containing
# the string NOCOMMIT. Use that tag in comments around source code you want to avoid
# accidentally committing, like temporary IP addresses or debug printfs.
#
# To add it to an existing repository, save it to .git/hooks/pre-commit (or append, if
# that file already exists). Remember to make executable (chmod +x ...)
#
# To automatically add this pre-commit hook to every repository you create or clone:
@davidneudorfer
davidneudorfer / profile.sh
Created Mar 24, 2018
Custom Slack Away Messages
View profile.sh
export SLACK_CLI_TOKEN='####'
alias dog_slack="/usr/bin/curl -s -X POST \
https://slack.com/api/users.profile.set \
--data-urlencode 'profile={\"status_text\":\"walking the dogs\", \"status_emoji\":\":dog2:\"}' \
--data-urlencode 'token=$SLACK_CLI_TOKEN' | jq '.profile.status_text'"
alias lunch_slack="/usr/bin/curl -s -X POST \
https://slack.com/api/users.profile.set \
--data-urlencode 'profile={\"status_text\":\"getting lunch\", \"status_emoji\":\":taco:\"}' \
View gist:e9508512d66825cbff7af2d57b69c0f2
Learning How To Learn
Module 1 - What is Learning
Focused/Diffuse Modes Thinking
- Obviously ‘focused’ is when you’re concentrating. Direct approach to solving familiar problems.
- Focused: thoughts move through nicely-paved road of familiar notions (neural pattern looks very tight and directed).
- encompasses rational, sequential, analytical approaches to thinking
- Diffuse: More of a search function neural pattern. Thoughts move widely. More of a broad/big-picture perspective trying to connect ideas from different places.
- We’re always either in focused or diffuse mode of thinking.
@davidneudorfer
davidneudorfer / app.Dockerfile
Last active Dec 8, 2016
HOTOSM Tasking Manager in Docker
View app.Dockerfile
FROM python:2.7.12
RUN apt-get update && \
apt-get install --no-install-recommends -y \
libgeos-dev
# ADD requirements.txt /opt/app/requirements.txt
ADD setup.py /opt/app/setup.py
ADD setup.cfg /opt/app/setup.cfg
ADD README.md /opt/app/README.md
View keybase.md

Keybase proof

I hereby claim:

  • I am davidneudorfer on github.
  • I am davidneudorfer (https://keybase.io/davidneudorfer) on keybase.
  • I have a public key whose fingerprint is 524E EF1F 0A8E 012F C7F2 5AC3 7C1E 0D62 9D10 D5CD

To claim this, I am signing this object:

View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@davidneudorfer
davidneudorfer / osx-for-hackers.sh
Last active Aug 27, 2015 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
View osx-for-hackers.sh
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
View easypaymetrocard_charges.rb
#! /usr/bin/env ruby
# Downloads "Payment Received" transactions from the EasyPayMetrocard
# website (www.easypaymetrocard.com").
#
# Requires capybara and capybara-webkit for headless JavaScript execution -
# the EasyPayMetroCard site requires JavaScript to obtain account activity.
#
# To install capybara-webkit, you must first install Qt, a cross-platform
# development kit. For instructions, see
You can’t perform that action at this time.