var result = await Application.Current.MainPage.DisplayAlert("Title", "Prompt", "Yes", "No");
await Application.Current.MainPage.DisplayAlert("Title", "Message", "OK");
This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.
If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.
# Removes all files and folders in user's Desktop except shortcuts | |
# Warning !!! | |
# Remove the -WhatIf to actually delete the file and directory objects !!! | |
# | |
Remove-Item "$home\Desktop\*" -Recurse -Exclude "*.lnk" -WhatIf | |
Remove-Item "$home\Desktop\*.*" -Recurse -Exclude "*.lnk" -WhatIf |
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
class AES | |
{ | |
public static string Encrypt(string plainText, string keyString) | |
{ | |
byte[] cipherData; |
'use strict'; | |
const crypto = require('crypto'); | |
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters) | |
const IV_LENGTH = 16; // For AES, this is always 16 | |
function encrypt(text) { | |
let iv = crypto.randomBytes(IV_LENGTH); | |
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv); |
<?php | |
/* | |
* PHP CS Fixer configuration | |
*/ | |
return PhpCsFixer\Config::create() | |
->setRules([ | |
'@PSR2' => true, | |
'@PHP70Migration' => true, | |
'@PhpCsFixer' => true, |
// Original source and author: https://www.axllent.org/docs/view/track-outbound-links-with-analytics-js/ | |
function _gaLt(event) { | |
try { | |
/* If GA is blocked or not loaded, or not main|middle|touch click then don't track */ | |
if (!ga.hasOwnProperty("loaded") || ga.loaded != true || (event.which != 1 && event.which != 2)) { | |
return; | |
} | |
var el = event.srcElement || event.target; |
# Ubuntu 16.04, php 7.0
sudo apt-get install php-xdebug
# Ubuntu 14.04, php 5.6
sudo apt-get install php5-xdebug
# Package generated configuration file | |
# See the sshd_config(5) manpage for details | |
# What ports, IPs and protocols we listen for | |
Port 22 | |
# Use these options to restrict which interfaces/protocols sshd will bind to | |
#ListenAddress :: | |
#ListenAddress 0.0.0.0 | |
Protocol 2 | |
# HostKeys for protocol version 2 |
[PHP] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |