Skip to content

Instantly share code, notes, and snippets.

View shankarnakai's full-sized avatar
🤓
System programming, Rust, low latency, Databases

Shankar Nakai Gonçalves dos Santos shankarnakai

🤓
System programming, Rust, low latency, Databases
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active September 20, 2025 15:54
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@langmi
langmi / CustomSqlParameterSourceProvider.java
Created September 30, 2011 09:14
simple example CustomSqlParameterSourceProvider which constructs a MapSqlParameterSource with given item
/**
* CustomSqlParameterSourceProvider, constructs {@link MapSqlParameterSource} with
* given item.
*
* @author Michael R. Lange <[email protected]>
*/
public class CustomSqlParameterSourceProvider implements ItemSqlParameterSourceProvider<YourItemObject> {
@Override
public SqlParameterSource createSqlParameterSource(final YourItemObject item) {
@jsundram
jsundram / cull.py
Last active April 15, 2025 14:00
Check if lat long is inside the bounds of the continental US (box model, not shape)
# http://en.wikipedia.org/wiki/Extreme_points_of_the_United_States#Westernmost
top = 49.3457868 # north lat
left = -124.7844079 # west long
right = -66.9513812 # east long
bottom = 24.7433195 # south lat
def cull(latlngs):
""" Accepts a list of lat/lng tuples.
returns the list of tuples that are within the bounding box for the US.
NB. THESE ARE NOT NECESSARILY WITHIN THE US BORDERS!