SSH into Root
$ ssh root@123.123.123.123
Change Root Password
| using Mobile.Droid.Renderers; | |
| using Xamarin.Forms; | |
| using Xamarin.Forms.Platform.Android; | |
| [assembly: ExportRenderer(typeof(Entry), typeof(CustomEntryRenderer_Droid))] | |
| namespace Mobile.Droid.Renderers | |
| { | |
| public class CustomEntryRenderer_Droid : EntryRenderer | |
| { |
| // MIT License | |
| // Nicholas Ventimiglia | |
| // 2016-9-19 | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Collections.ObjectModel; | |
| using System.Collections.Specialized; | |
| using System.Linq; |
SSH into Root
$ ssh root@123.123.123.123
Change Root Password
| using System; | |
| using Xamarin.Forms; | |
| using System.Collections; | |
| namespace YourNamespace.Views.Controls { | |
| public class BindablePicker : Picker | |
| { | |
| public BindablePicker() | |
| { | |
| this.SelectedIndexChanged += OnSelectedIndexChanged; |
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
| // Update the appropriate href query string parameter | |
| function paramReplace(name, string, value) { | |
| // Find the param with regex | |
| // Grab the first character in the returned string (should be ? or &) | |
| // Replace our href string with our new value, passing on the name and delimeter | |
| var re = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
| delimeter = re.exec(string)[0].charAt(0), | |
| newString = string.replace(re, delimeter + name + "=" + value); | |
| return newString; |
| public interface IRemove | |
| { | |
| ICommand RemoveCommand { get; } | |
| } |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
| <% flash.each do |type, message| %> | |
| <div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
| <button class="close" data-dismiss="alert">×</button> | |
| <%= message %> | |
| </div> | |
| <% end %> |
The normal controller/view flow is to display a view template corresponding to the current controller action, but sometimes we want to change that. We use render in a controller when we want to respond within the current request, and redirect_to when we want to spawn a new request.
The render method is very overloaded in Rails. Most developers encounter it within the view template, using render :partial => 'form' or render @post.comments, but here we'll focus on usage within the controller.