Skip to content

Instantly share code, notes, and snippets.

View nonrational's full-sized avatar

Alan Norton nonrational

View GitHub Profile
@nonrational
nonrational / javascript-countdown.js
Created October 24, 2011 16:00
countdown to christmas!
// Last work of "before the date is reached" message. Change the rest of it below...
var before = "Christmas!"
// text you want to show when the date is reached.
var current = "Today is Christmas. Merry Christmas!"
// Display Months
var montharray = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
function countdown(yr, m, d) {
@nonrational
nonrational / timeRemaining.js
Created October 24, 2011 22:35
Days, Hours, Minutes, Seconds until Midnight at YYYY-MM-DD
function timeRemaining(yr, m, d) {
function pad(i) {
return (i < 10) ? "0" + i : "" + i;
}
var montharray = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
var theyear = yr, themonth = m, theday = d, today = new Date();
var todayy = today.getYear();
if (todayy < 1000){
todayy += 1900
@nonrational
nonrational / gist:2294049
Created April 3, 2012 17:44
recursive print 1-10
// 0 <----- root_node
// / \
// 1 2
// / \ \
// 3 4 5
// / / \ \
// 6 7 8 9
function print_node(n){
console.log(n);
diff --git a/src/qt/config.tests/qpa/wayland/wayland.cpp b/src/qt/config.tests/qpa/wayland/wayland.cpp
index 029e54e..1d38b9e 100644
--- a/src/qt/config.tests/qpa/wayland/wayland.cpp
+++ b/src/qt/config.tests/qpa/wayland/wayland.cpp
@@ -38,7 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <wayland-client.h>
+// #include <wayland-client.h>
This file has been truncated, but you can view the full file.
Determining system architecture... (Darwin:13.0.1:x86_64)
'macosx' is supported
System architecture: 'macosx'
Precompiled-headers support enabled.
Xarch support detected
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
Symbol visibility control enabled.
This is the Qt for Mac OS X Open Source Edition.
foreach day in all_days_this_summer do
if day.is_raining? then
me.equip(umbrella)
me.visit(movie_theater)
else
me.equip(shovel_and_pail)
me.visit(beach)
end
@nonrational
nonrational / list-iam-keys-by-user-jq.sh
Last active June 3, 2021 13:23
list IAM keys / identities (awscli, underscore-cli or jq)
for u in $(aws iam list-users | jq ".Users[].UserName" --raw-output); do
aws iam list-access-keys --user $u | jq '.AccessKeyMetadata[] | .UserName + ":" + .AccessKeyId' ;
done

Keybase proof

I hereby claim:

  • I am nonrational on github.
  • I am nonrational (https://keybase.io/nonrational) on keybase.
  • I have a public key whose fingerprint is 9692 428B 7CC7 C05A F5CE 7F1B 4237 23D3 600E 9871

To claim this, I am signing this object:

@nonrational
nonrational / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@nonrational
nonrational / reverse-tweets.js
Created March 17, 2015 23:02
reverse tweet order on twitter.com
// valid as of 20150317
// run it in chrome's web inspector for easy, top-down reading + screenshots
w = $('.GridTimeline-items'); w.children().each(function(i,li){w.prepend(li)})