Skip to content

Instantly share code, notes, and snippets.

#ruby find out midnight without activesupport
Time::utc(*Time.now.to_a.slice(3..10).insert(0,0,0,0))
# of course can replace Time.now
@phedders
phedders / gist:1080013
Created July 13, 2011 09:53 — forked from technoweenie/gist:1072829
.netrc file so you can push/pull to https git repos without entering your creds all the time
machine github.com
login technoweenie
password SECRET
machine api.github.com
login technoweenie
password SECRET
@phedders
phedders / mosh-wrapper-simple
Created December 9, 2012 22:18
Very Simple shell mosh-{client,server} wrapper
h=1.2.3.4;
read a b port MOSH_KEY < <(ssh $h -t mosh-server 2>/dev/null|tr -d "\r"|grep MOSH); mosh-client $h $port
or
eval `ssh $h -t mosh-server 2>/dev/null|tr -d "\r"|awk '/^MOSH CONNECT/{print "MOSH_KEY=" $4,"mosh-client $h",$3}'`
Transformer Docked -> INSERT POWER TO DOCK CONNECTOR
D/PowerManagerService( 689): @PowerManagement: Release UWL 'StayOnWhilePluggedIn Screen Dim' flags [screen_dim]
D/PowerManagerService( 689): forceUserActivityLocked when usb changes
D/PowerManagerService( 689): @PowerManagement: Release UWL 'StayOnWhilePluggedIn Partial' flags [partial]
D/PowerManagerService( 689): IntentUserActivityLocked, send wakeup intent to Keyguard
D/KeyguardViewMediator( 689): Receive wakeup source, keyguard show:false
D/LowBatteryService( 9956): onReceive:Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 (has extras) }
D/LowBatteryService( 9956): mAcOnline = false, mDeviceBatteryLevel = 85, mDockBatteryLevel = 0, mDockBatteryStatus = 0
D/LowBatteryService( 9956): Battery level is higher than threshold, no need to apply
@phedders
phedders / config.yml
Created August 16, 2017 22:33 — forked from Admicos/config.yml
Join Python receiver thingy
port: 1818
commands:
# Join Push Text : Command to run
"eg=:=shutdown": "systemctl poweroff"
Traceback (most recent call last):
File "/home/prh/openlp/openlp/core/ui/servicemanager.py", line 457, in on_load_service_clicked
self.load_file(file_path)
File "/home/prh/openlp/openlp/core/ui/servicemanager.py", line 700, in load_file
self.process_service_items(items)
File "/home/prh/openlp/openlp/core/ui/servicemanager.py", line 741, in process_service_items
new_item = Registry().get(service_item.name).service_load(service_item)
File "/home/prh/openlp/openlp/plugins/songs/lib/mediaitem.py", line 749, in service_load
self.on_search_text_button_clicked()
File "/home/prh/openlp/openlp/plugins/songs/lib/mediaitem.py", line 183, in on_search_text_button_clicked
@phedders
phedders / gist:134d6b1c459e554c63f95489898dd51e
Created September 10, 2019 20:16
OLP crash - Debian testing/unstable
prh@knot:~/openlpbzr$ ./run_openlp.py
qt5ct: using qt5ct plugin
[31390:31497:0910/211456.702326:ERROR:nss_util.cc(727)] After loading Root Certs, loaded==false: NSS error code: -8018
qt5ct: D-Bus global menu: no
Received signal 11 SEGV_MAPERR 0000000001d8
#0 0x7f829e1dcbde <unknown>
#1 0x7f829e1dccf0 <unknown>
#2 0x7f829e1dd327 <unknown>
#3 0x7f82a6c39940 QBackingStore::endPaint() called with active painter on backingstore paint device
QBasicTimer::start: Timers cannot be started from another thread
@phedders
phedders / index.html
Created November 14, 2019 18:28
rainbow lines of straightness
<canvas id=c></canvas>
@phedders
phedders / index.html
Created November 14, 2019 18:32
Pure CSS Gradient Background Animation
<div class="container">
<h1>Pure CSS Animated Gradient Background</h1>
<h3><a href="https://codepen.io/P1N2O/full/pyBNzX" target="_blank">Full Screen <svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="18" height="18"
viewBox="0 0 172 172"
style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#eeeeee"><path d="M143.19336,21.43001c-0.26705,0.00844 -0.53341,0.03181 -0.79785,0.06999h-34.89551c-2.58456,-0.03655 -4.98858,1.32136 -6.29153,3.55376c-1.30295,2.2324 -1.30295,4.99342 0,7.22582c1.30295,2.2324 3.70697,3.59031 6.29153,3.55376h18.53256l-66.59961,66.59961c-1.8722,1.79752 -2.62637,4.46674 -1.97164,6.97823c0.65473,2.51149 2.61604,4.4728 5.12753,5.12753c2.51149,0.65473 5.18071,-0.09944 6.97823,