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
server {
server_name local.cms.ondamx.art;
location / {
proxy_pass http://local.cms.ondamx.art:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
#include <SPI.h>
#include <MFRC522.h>
int LED1 = 22;
int LED2 = 23;
constexpr uint8_t RST_PIN = 9; // Configurable, see typical pin layout above
constexpr uint8_t SS_1_PIN = 10; // Configurable, take a unused pin, only HIGH/LOW required, must be diffrent to SS 2
constexpr uint8_t SS_2_PIN = 47; // Configurable, take a unused pin, only HIGH/LOW required, must be diffrent to SS 1
constexpr uint8_t SS_3_PIN = 7; // Configurable, take a unused pin, only HIGH/LOW required, must be diffrent to SS 1
constexpr uint8_t NR_OF_READERS = 3;
### Keybase proof
I hereby claim:
* I am mixcas on github.
* I am mixcas (https://keybase.io/mixcas) on keybase.
* I have a public key ASDdV7QNji41YMhZm8XQdkW5FddDdwppyhIEA1tLV0tsBwo
To claim this, I am signing this object:
@mixcas
mixcas / copy_playlist_videos_titles.js
Created July 26, 2017 00:31
copy youtube video titles from a playlist
// Copy paste in console
var titles = document.getElementsByClassName('pl-video-title-link');
var titlesText = '';
for(var i = 0; i < titles.length; i++) {
titlesText += titles[i].innerHTML.trim() + "\n";
}
copy(titlesText)
@mixcas
mixcas / roundcubeToCSV.js
Created April 18, 2017 01:19
Emails in Roundcube to CSV
function Json2CSV(objArray) {
var getKeys = function(obj) {
var keys = [];
for (var key in obj) {
keys.push(key);
}
return keys.join();
};
var array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray;
#!/bin/sh
# VARS
echo 'Starting Mongo backup'
MONGODB_DATABASE=app-material-fair-com
AWS_ACCESS_KEY=
AWS_SECRET_KEY=
S3_BUCKET=
CONTENT_TYPE=
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' &&\
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){
<?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);
@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