Skip to content

Instantly share code, notes, and snippets.

@maratbn
maratbn / general-functions.php
Created August 3, 2016 22:14
Jupiter WordPress theme file '/framework/functions/general-functions.php' that's licensed under GPL (b/c WordPress is GPL)
<?php
define('GLOBAL_ASSETS','global_assets');
/*
* Convert theme settings to a globaly accessible vaiable throught the theme.
*/
if (!function_exists('mk_theme_options')) {
function mk_theme_options($check = false) {
$GLOBALS['mk_options'] = get_option(THEME_OPTIONS);
@maratbn
maratbn / string-digest.rb
Created May 28, 2016 21:28
Script that will encrypt the string specified with SHA-256 hex digest for the number of cycles specified.
#!/usr/bin/ruby
# Author: Marat Nepomnyashy
require 'digest'
puts 'This will encrypt the string specified with SHA-256 hex digest for the number of cycles specified.'
print 'Enter the string to encrypt: '
stringEncrypt = gets.chomp