Skip to content

Instantly share code, notes, and snippets.

View ahmetanbar's full-sized avatar
👨‍💻
Life is short. Let's code.

Ahmet Anbar ahmetanbar

👨‍💻
Life is short. Let's code.
View GitHub Profile
@vladox
vladox / download_sentry_data.py
Last active April 13, 2024 01:00 — forked from bubenkoff/download_sentry_data.py
Download all sentry events for a project. Useful for data processing
"""Download sentry data.
usage:
python download_sentry_data.py <org>/<project> <api_key>
"""
import requests
import csv
import sys
if __name__ == '__main__':
@NigelEarle
NigelEarle / Knex-Setup.md
Last active July 8, 2024 11:52
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
@giuseppebonaccorso
giuseppebonaccorso / hodgkin-huxley-main.py
Created August 19, 2017 15:06
Hodgkin-Huxley spiking neuron model in Python
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import odeint
# Set random seed (for reproducibility)
np.random.seed(1000)
# Start and end time (in milliseconds)
tmin = 0.0
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@SSARCandy
SSARCandy / opencv_with_cmake.md
Last active April 15, 2024 02:25
Setting up OpenCV(+extra modules) with Cmake step by step tutorial

Setting up OpenCV with Cmake GUI

  1. Download OpenCV and Cmake
  2. Build opencv with cmake image
  • Press configure, choose visual studio 2015, finish
  • Then press generate
  1. Open OpenCV.sln under build/
  2. Build it using Debug, Release
    image
@buchireddy
buchireddy / beautify_json_file.py
Created February 13, 2016 01:22
Beautify a JSON file with python
import simplejson as json
obj = None
with open('file.json') as f:
obj = json.load(f)
outfile = open('file.json', "w")
outfile.write(json.dumps(obj, indent=4, sort_keys=True))
outfile.close()
@Kartones
Kartones / postgres-cheatsheet.md
Last active July 23, 2024 09:14
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@mitchwongho
mitchwongho / Docker
Last active June 26, 2024 07:28
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master