Skip to content

Instantly share code, notes, and snippets.

View davispuh's full-sized avatar

Dāvis davispuh

  • Latvia
View GitHub Profile
@davispuh
davispuh / channels.sql
Created August 26, 2014 00:08
Most active channels
SELECT count(messageid) as count, buffername as channel
FROM backlog
LEFT JOIN buffer ON buffer.bufferid = backlog.bufferid
WHERE buffername != ''
GROUP BY buffername ORDER BY count DESC
LIMIT 30;
@davispuh
davispuh / steam_console_params.txt
Last active April 17, 2024 11:37
Steam client parameters, consoles commands and variables
-480p - Run tenfoot in 480p rather than 1080p
-720p - Run tenfoot in 720p rather than 1080p
-accesscode -
-all_languages - show longest loc string from any language
-batterytestmode - rapidly cycle battery percentages for testing
-bigpicture - Start in Steam Big Picture mode
-blefw -
-cafeapplaunch - Launch apps in a cyber cafe context
-candidates - Show libjingle candidates for local connection as they are processed
-ccsyntax - Spew details about the localized strings we load
@willurd
willurd / web-servers.md
Last active April 15, 2024 09:55
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@davispuh
davispuh / array.rb
Last active December 15, 2015 10:29
Equally distribute several array elements across single array. (Ruby)
#!/usr/bin/env ruby
require 'pp'
a = []
a << [:a, :c, :e]
a << [:b, :f, :g, :h, :i, :j]
a << [:d]
# element coefficients
@postmodern
postmodern / comment.md
Last active January 11, 2024 15:37
Crypto Privacy Copy Pasta
@hakre
hakre / DomTree.php
Last active February 22, 2021 11:40
DomTree - Dump DomDocument based documents, suiting debugging needs
<?php
/**
* DomTree
*
* Dump DomDocument based documents, suiting debugging needs
*
* @author hakre <http://hakre.wordpress.com/>
* @link http://stackoverflow.com/questions/26321597/getting-price-from-amazon-with-xpath/26323824#26323824
* @link http://stackoverflow.com/questions/12108324/how-to-get-a-raw-from-a-domnodelist/12108732#12108732
* @link http://stackoverflow.com/questions/684227/debug-a-domdocument-object-in-php/8631974#8631974
@luislavena
luislavena / gist:3251384
Created August 3, 2012 20:49
Testing Ruby 2.0 on Windows

Prepare for Ruby 2.0, today

Ruby 2.0 is around the corner, estimated to be launch February 2013, for its 20th anniversary!

Wouldn't be great to be able to test Ruby 2.0 features and report possible bugs?

Things like Refinements, built-in ANSI coloring for Windows or even better, faster startup

Users of other OS like Linux and OSX already can install upcoming versions of RUby thanks to RVM and rbenv tools, but what about Windows?