This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =============================== | |
// AUTHOR : Frederic Babord | |
// CREATE DATE : 24th April 2018 | |
// PURPOSE : Auto-Save Modified Scenes and Assets in Unity | |
// SPECIAL NOTES : This script requires Asyncronous functions which REQUIRES C# 6.0 and .NET 4.6 which is | |
// experimental in Unity 2017 and stable in Unity 2018. | |
// MINIMUM Unity Version: 2017 | |
// Needs to be placed in an Editor folder | |
// =============================== | |
// Change History: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity < Android::App::Activity | |
include ViewGeneration | |
def generate_screen | |
root_view( | |
horizontal_layout(:row0, text_view(:title, "a dark room")), | |
horizontal_layout(:row1, | |
hidden_button(:outside_button, "a silent forest"), | |
hidden_button(:embark_button, "a dusty path") | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rack_sse.ru | |
# | |
# An example of basic real-time, single-room broadcast chat using Server Sent | |
# Events in plain old Rack. This example does NOT use hijack, or the async | |
# hacks, it just relies on a well implemented threaded Rack server (at time of | |
# writing this will therefore only work with puma!). Other servers should be | |
# fixed to support this, as it is pretty critical to how Rack *should* work on | |
# most servers. The only spec-acceptable failure in this case is not flushing | |
# the content stream on each yield (for which the rack spec has no workaround | |
# today). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'mail' # gem install mail --no-document | |
# Credit to : | |
# http://stackoverflow.com/questions/12884711/how-to-send-email-via-smtp-with-rubys-mail-gem | |
def ask question | |
print "#{question} ? : " | |
$stdin.gets.chomp! | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/a/8936202 | |
# | |
# ActiveAdmin already includes the necessary jquery in active_admin/base, | |
# so just add this to javascripts/active_admin.js after //= require active_admin/base | |
# | |
# | |
# Serialize and Sort | |
# | |
# model_name - you guessed it, the name of the model we are calling sort on. | |
# This is the actual variable name, no need to change it. |