Skip to content

Instantly share code, notes, and snippets.

View silmood's full-sized avatar

Petter Hdz silmood

  • GDG Androidtitlan
  • Mexico City
View GitHub Profile
@rbnpi
rbnpi / VisualFrereJaques.rb
Created December 24, 2017 10:02
A visualisation of a four part round of Frere Jaques played by Sonic Pi 3 and a processing sketch, linked by OSC messages. They should both be run on the same computer. A video of the project is at https://youtu.be/w89G0dN2BM0
#Frere jaques with visualization in Processing
#written by Robin Newman, December 23rd 2017
#info from Sonic Pi transmitted in OSC messages to drive the processing sketch
#A 4 part round is played, and each part is represented by a separate column
#the colour of each part varies with pitch as does the vertical postion of each note
#The radius of each "note" depends on its duration.
nmax=2 #number of iterations of Frère Jaques played
use_osc_logging true
#note and duration data for Frère Jaques
nf=[:c4,:d4,:e4,:c4]*2+[:e4,:f4,:g4]*2+[:g4,:a4,:g4,:f4,:e4,:c4]*2+[:c4,:g3,:c4]*2
@adham90
adham90 / spacemacs-keybindings
Last active December 27, 2025 20:22
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@skyfishjy
skyfishjy / CursorRecyclerViewAdapter.java
Last active March 18, 2025 21:07
CursorRecyclerViewAdapter
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@basham
basham / css-units-best-practices.md
Last active March 17, 2026 08:48
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

@staltz
staltz / introrx.md
Last active March 21, 2026 07:17
The introduction to Reactive Programming you've been missing
@diegovalle
diegovalle / README.md
Last active January 8, 2024 19:24
Topojson of Mexican municipalities and states

How to create the topojson map:

curl -o estados.zip http://mapserver.inegi.org.mx/MGN/mge2010v5_0.zip
curl -o  municipios.zip http://mapserver.inegi.org.mx/MGN/mgm2010v5_0.zip
unzip estados.zip 
unzip municipios.zip
ogr2ogr states.shp Entidades_2010_5.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"
ogr2ogr municipalities.shp Municipios_2010_5.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"
topojson -o mx_tj.json -s 1e-7 -q 1e5 states.shp municipalities.shp -p state_code=+CVE_ENT,state_name=NOM_ENT,mun_code=+CVE_MUN,mun_name=NOM_MUN