Skip to content

Instantly share code, notes, and snippets.

@arcanemachine
arcanemachine / citysports-walking-pad-remote-codes.txt
Created April 5, 2025 00:40
Citysports walking pad remote codes (CSV)
==> down.csv <==
time,msg,codes,model,button,id,channel,battery_ok,temperature_C,mic,subtype,humidity,state,rain_mm,status,rain_rate,rain_rate_mm_h,rain_rate_in_h,rain_total,rain_in,gust,average,direction,wind_max_m_s,wind_avg_m_s,wind_dir_deg,pressure_hPa,uv,power_W,energy_kWh,radio_clock,sequence,unit,group_call,command,dim,dim_value,dipswitch,rbutton,temperature_F,data,closed,event,tamper,esn,exception,status_hex,xactivity,xtamper1,xtamper2,setpoint_C,switch,cmd,cmd_id,tristate,wind_avg_km_h,wind_max_km_h,signal,sensor_code,uv_sensor_id,uv_status,uv_index,lux,wm,seq,current,interval,learn,message_type,sequence_num,leak_detected,wind_avg_mi_h,storm_dist,strike_count,strike_distance,active,raw_msg,rfi,wind_max_mi_h,wind_approach,flags,maybetemp,binding_countdown,depth_cm,power0_W,power1_W,power2_W,power0,node,ct1,ct2,ct3,ct4,batt_Vrms,temp1_C,temp2_C,temp3_C,temp4_C,temp5_C,temp6_C,pulse,button1,button2,button3,button4,group,transmit,moisture,type,pressure_PSI,battery_mV,pressure_kPa,pulses,pulsecount,len,to
@arcanemachine
arcanemachine / agent_counter.exs
Last active March 20, 2025 19:41
Elixir - Simple agent-based counter
# Put this code inside a function to easily count the number of times the
# function is called.
# Create the agent
agent_process_name = :your_agent
if Process.whereis(agent_process_name) == nil do
{:ok, a} = Agent.start_link(fn -> 0 end)
Process.register(a, agent_process_name)
end
@arcanemachine
arcanemachine / i3gw
Created August 2, 2024 10:22 — forked from budRich/i3gw
ghost window wrapper for i3wm
#!/bin/bash
# i3gw - "ghost window" wrapper for i3
# ctrl+c, ctrl+v by budRich 2017
#
# https://www.reddit.com/r/i3wm/comments/6x5vgp/oc_i3gw/
# https://gist.github.com/budRich/d09cbfd07ffdc57680fbc51ffff3687b
#
# i3-msg has an undocumented function (open) that creates
# empty containers, or as I call them: ghosts.
@arcanemachine
arcanemachine / assert_eventually.exs
Last active June 23, 2024 22:01
Elixir: Simple implementation of `assert_eventually` for tests
@default_interval 99
@default_timeout 9_000
@doc """
Assert that a condition eventually evaluates to `true`.
## Options
All time-related options are in milliseconds.
- `:timeout` (default: `#{@default_timeout}`) - the maximum total time until the assertion fails
@arcanemachine
arcanemachine / setup-gitlab-runner-for-non-root-user.md
Last active March 29, 2024 19:16
How to set up `gitlab-runner` for a non-root user

Here's how I set up gitlab-runner for a non-root user inside a Vagrant VM (should work for non-VM machines as well):

  • Check to see if the process is running for the existing user:

ps aux | grep gitlab

  • If the process is running, it will look something like this after you run the previous command:

/usr/bin/gitlab-runner run --config /etc/gitlab/runner/config.toml --service gitlab-runner

@arcanemachine
arcanemachine / hetzner-benchmarks--2023-04-30.txt
Last active May 5, 2023 08:20
Hetzner Geekbench Benchmarks - April 2023
CAX11
- 2-core ARM + 4GB RAM + 40GB Storage + 20TB Traffic
- 1099 Single / 1995 Multi
- https://browser.geekbench.com/v6/cpu/1103496
CAX41
- 16-core ARM + 32 GB RAM + 320GB Storage + 20TB Traffic
- 1141 Single / 9274 Multi
- https://browser.geekbench.com/v6/cpu/1153915