Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<!-- | |
// | |
// Copyright (c) Microsoft Corporation. All Rights Reserved. | |
// | |
--> | |
<ResourceDictionary | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<ResourceDictionary.ThemeDictionaries> |
// Encrypt where jo is input, and query is output and ENCRPYTION_KEy is key | |
byte[] input = jo.toString().getBytes("utf-8"); | |
MessageDigest md = MessageDigest.getInstance("MD5"); | |
byte[] thedigest = md.digest(ENCRYPTION_KEY.getBytes("UTF-8")); | |
SecretKeySpec skc = new SecretKeySpec(thedigest, "AES/ECB/PKCS5Padding"); | |
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); | |
cipher.init(Cipher.ENCRYPT_MODE, skc); | |
byte[] cipherText = new byte[cipher.getOutputSize(input.length)]; |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
using Microsoft.Phone.Controls; | |
using System; | |
using System.Windows.Controls.Primitives; | |
/// <summary> | |
/// This class detects the pull gesture on a LongListSelector. How does it work? | |
/// | |
/// This class listens to the change of manipulation state of the LLS, to the MouseMove event | |
/// (in WP, this event is triggered when the user moves the finger through the screen) | |
/// and to the ItemRealized/Unrealized events. |
if (config.admin.email) { | |
process.on('uncaughtException', function(err) { | |
console.log(err.stack); | |
nodemailer.createTransport("SMTP", { | |
service: "Sendgrid" | |
, auth: { | |
user: config.smtp.username | |
, pass: config.smtp.password | |
} | |
}).sendMail({ |
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80
/** | |
* This code is licensed under the terms of the MIT license | |
* | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
# Create a container from the mongo image, | |
# run is as a daemon (-d), expose the port 27017 (-p), | |
# set it to auto start (--restart) | |
# and with mongo authentication (--auth) | |
# Image used is https://hub.docker.com/_/mongo/ | |
docker pull mongo | |
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth | |
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception) | |
# add a root user |