Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View archf's full-sized avatar

Felix Archambault archf

View GitHub Profile
@jarrettmeyer
jarrettmeyer / insert_data.py
Last active April 8, 2022 07:10
Inserting data into HBase with Python
#!/usr/bin/env python
"""
Insert data into HBase with a Python script.
To create the table, first use the hbase shell. We are going to create a
namespace called "sample_data". The table for this script is called "rfic",
as we will be inserting Request for Information Cases from the City of
Indianapolis.
@halberom
halberom / play.yml
Last active August 29, 2015 14:18
ansible - examples of the different forms of yaml
---
- hosts: foo
tasks:
- name: single line plain style
file: path=/tmp/foo state=touch
- name: multi line plain style
file: path=/tmp/foo
state=absent
@trusktr
trusktr / DefaultKeyBinding.dict
Last active April 21, 2024 06:32
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@maurizi
maurizi / ansible-galaxy.bat
Last active December 16, 2022 11:34
Running Ansible on Windows
@echo off
cygwin-shim.bat /bin/ansible-galaxy %*
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@korya
korya / Subfolder to git repo.md
Last active December 16, 2023 10:29
Convert subfolder into Git submodule
@jvns
jvns / interview-questions.md
Last active March 5, 2024 19:03
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@plentz
plentz / nginx.conf
Last active April 22, 2024 10:54
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
@Flushot
Flushot / jinja2_dateformat.py
Created June 14, 2013 23:09
Jinja2 filter that formats a date and optionally localizes it to client timezone
from dateutil import tz
from jinja2 import Undefined
client_timezone = tz.gettz('PST8PDT') # timezone to translate to
@app.template_filter()
def dateformat(value, format=None, rebase=True):
if value is None or isinstance(value, Undefined):
return ''
@mouseroot
mouseroot / ip_routing_win7.txt
Created April 30, 2013 16:41
Enable IP Routing in Windows 7
1. Open regedit
2. Navigate to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\"
3. Change IPEnableRouter to 1
4. Run services->Routing and Remote->start
(reboot may be nessesary)