Skip to content

Instantly share code, notes, and snippets.

View mixcas's full-sized avatar
🎶
hacking for kpop

Carlos Solares mixcas

🎶
hacking for kpop
View GitHub Profile
admins-iMac:~ cas$ brew doctor
Your system is raring to brew.
admins-iMac:~ cas$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: bd29176508aa2f33fca0692a5c9174e6d9567632
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.7.5-x86_64
@mixcas
mixcas / opengraph_wordpress
Last active December 23, 2015 20:29
Facebook Open Graph tags for Wordpress
<?php //FACEBOOK OG ?>
<meta property="fb:app_id" content="231596313659705"/>
<meta property="og:title" content="<?php if (is_home () || is_front_page() ) {
bloginfo('name');
} elseif ( is_category() ) {
single_cat_title(); echo ' | ' ; bloginfo('name');
} elseif (is_single() ) {
single_post_title();
} elseif (is_page() ) {
single_post_title(); echo ' | '; bloginfo('name');
@mixcas
mixcas / blocker.js
Last active November 18, 2016 22:31
Blocker.js
(function(){
var css = "@font-face{font-family:'Block';src:url('https://github.com/christiannaths/Redacted-Font/raw/master/src/Redacted-Regular.ttf') format('truetype');} body{font-size: 0.6em !important;letter-spacing: -1px;}",
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
--- Proyectos/my-repo ‹master› » tree .git
.git
|-- HEAD
|-- branches
|-- config
|-- description
|-- hooks
| |-- applypatch-msg.sample
| |-- commit-msg.sample
| |-- post-update.sample
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
function base64_decode(input){
var output = new Array();
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
var orig_input = input;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
if (orig_input != input)
@mixcas
mixcas / 45-75
Created November 21, 2015 02:19
javascript:(function()%7Bfunction%20loadScript(a,b)%7Bvar%20c%3Ddocument.createElement(%27script%27)%3Bc.type%3D%27text/javascript%27%3Bc.src%3Da%3Bvar%20d%3Ddocument.getElementsByTagName(%27head%27)%5B0%5D,done%3Dfalse%3Bc.onload%3Dc.onreadystatechange%3Dfunction()%7Bif(!done%26%26(!this.readyState%7C%7Cthis.readyState%3D%3D%27loaded%27%7C%7Cthis.readyState%3D%3D%27complete%27))%7Bdone%3Dtrue%3Bb()%7D%7D%3Bd.appendChild(c)%7DloadScript(%27http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js%27,function()%7Bvar%20redOutline%3D%7Boutline:%272px%20solid%20red%27%7D,text%3Bvar%20textyElements%3D%27p,%20li,%20dt,%20dd,%20h1,%20h2,%20h3,%20h4,%20h5,%20h6%27%3B%24(textyElements).on(%27mouseover.red%27,function()%7B%24(this).css(redOutline)%7D).on(%27mouseleave.red%27,function()%7B%24(this).removeAttr(%27style%27)%7D).on(%27click.red%27,function()%7Btext%3D%24(this).text()%3Bvar%20e%3Dtext.substring(0,45)%3Bvar%20t%3Dtext.substring(45,75)%3Bvar%20n%3Dtext.substring(75,text.length)%3Bvar%20r%3De%2B%27%3Cs
<?php
// ---------------- Debug page and template request
function debug_page_request() {
global $wp, $template;
define("D4P_EOL", "\r\n");
echo '<!-- Request: ';
echo empty($wp->request) ? "None" : esc_html($wp->request);
echo ' -->'.D4P_EOL;
echo '<!-- Matched Rewrite Rule: ';
echo empty($wp->matched_rule) ? None : esc_html($wp->matched_rule);
add_filter('tiny_mce_before_init','configure_tinymce');
/**
* Customize TinyMCE's configuration
*
* @param array
* @return array
*/
function configure_tinymce($in) {
$in['paste_preprocess'] = "function(plugin, args){
find . -iname "*plugin-name*" -exec rename -v "s/plugin-name/novaramedia-shareables/g" "{}" \; &&\
grep -lr plugin-name . | xargs perl -pi -w -e 's/plugin-name/novaramedia-shareables/g' &&\
grep -lr plugin_name . | xargs perl -pi -w -e 's/plugin_name/novaramedia_shareables/g' &&\
grep -lr Plugin_Name . | xargs perl -pi -w -e 's/Plugin_Name/Novaramedia_Shareables/g' &&\
grep -lr 'plugin name' . | xargs perl -pi -w -e 's/plugin name/novaramedia shareables/g' &&\
grep -lr 'Plugin Name' . | xargs perl -pi -w -e 's/Plugin Name/Novaramedia Shareables/g' &&\
#!/bin/sh
# VARS
echo 'Starting Mongo backup'
MONGODB_DATABASE=app-material-fair-com
AWS_ACCESS_KEY=
AWS_SECRET_KEY=
S3_BUCKET=
CONTENT_TYPE=