You can run these commands to encrypt or decrypt a string:
To encrypt:
printf "Lorem ipsum dolor sit amet, ..." | \
openssl enc -e -base64 -A -pbkdf2 -aes-256-cbc -pass pass:"my-password"
#!/bin/bash | |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
<?php | |
/** | |
* Usage: | |
* $message = 'My First Push Notification!'; | |
* $pushServer = new PushSerer(); | |
* $pushServer->pushToGoogle('REG-ID-HERE', $message); | |
* $pushServer->pushToApple('DEVICE-TOKEN-HERE', $message); | |
*/ | |
class PushServer |
'use strict'; | |
/** | |
* AccountController allows the User to change settings, link with their GitHub accounts, etc | |
*/ | |
skeletonApp.controller('AccountController', [ | |
'$scope', '$location', '$rootScope', 'OAuthService', 'ParseService', function($scope, $location, $rootScope, OAuthService, ParseService) { | |
// redirect to "/login" if user is not logged in |
/* | |
Do the following when you make your slider: | |
myUpdatingSlider.down("#UpdatingSliderField").setValue(startValue); | |
myUpdatingSlider.down("#UpdatingSliderLabel").setHtml(startValue); | |
Sample CSS: | |
.slider-label{ | |
font-size: 2em; |
/** | |
* European Energy Label in CSS | |
*/ | |
.energy-class { | |
position: relative; | |
width: 155px; | |
font-family : sans-serif; | |
} | |
.energy-class span { |
function toWKT(layer) { | |
var lng, lat, coords = []; | |
if (layer instanceof L.Polygon || layer instanceof L.Polyline) { | |
var latlngs = layer.getLatLngs(); | |
for (var i = 0; i < latlngs.length; i++) { | |
latlngs[i] | |
coords.push(latlngs[i].lng + " " + latlngs[i].lat); | |
if (i === 0) { | |
lng = latlngs[i].lng; | |
lat = latlngs[i].lat; |
//Display Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); | |
//Save variation fields | |
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 ); | |
function variable_fields( $loop, $variation_data ) { | |
?> | |
<tr> |
<?php | |
if (!function_exists('get_post_id_by_meta_key_and_value')) { | |
/** | |
* Get post id from meta key and value | |
* @param string $key | |
* @param mixed $value | |
* @return int|bool | |
* @author David Mårtensson <david.martensson@gmail.com> | |
*/ | |
function get_post_id_by_meta_key_and_value($key, $value) { |
var flatten, obj; | |
flatten = require ('./flatten'); | |
obj = { | |
foo: 'bar', | |
bar: 'foo', | |
foobar: { | |
foo: 'foo', | |
bar: 'bar' | |
} |