Skip to content

Instantly share code, notes, and snippets.

View kazzkiq's full-sized avatar

Claudio Holanda Jr. kazzkiq

View GitHub Profile
@kazzkiq
kazzkiq / centralizer.css
Created January 29, 2014 18:12
Final way to centralize liquid element vertical and horizontally (with CSS3)
/*
The world need to know about this.
Most part taken from: http://pt.stackoverflow.com/a/166/1754 (its in portuguese)
IE 9+ , Chrome , Firefox , Opera , iOS 3.2+ , Android 2.1+ , IE Mobile 10+
*/
.centralize-me{
position:absolute; /*fixed works too*/
@kazzkiq
kazzkiq / scrollersScanner
Created March 11, 2014 18:45
Find which elements are exploding your window size (creating scrollbars)
function scanForScrollers(el) {
var i = [],
t, x, y, w, h,
ww = $(window).width(),
wh = $(window).height();
el.each(function (index) {
t = $(this);
x = t[0].offsetLeft;
y = t[0].offsetTop;
function resultsFromForm(el){
var results = {};
$('.question',el).each(function(){
var iv = $('input:checked', this)[0].value;
if(iv.split("|").length > 1){
var iarray = iv.split("|"), isize = iarray.length, i;
console.log(iarray);
for(i = 0; i < isize; i++){
if(results[iarray[i]] == undefined){
@kazzkiq
kazzkiq / switcher.html
Last active October 21, 2015 21:28
Switcher Riot Component
<ac-switch>
<div class="ac-switch">
<input name="switcher" type="checkbox" id="{ opts.id }" onchange="{ makeSwitch }" />
<label for="{ opts.id }"></label>
<span name="labelOn">{ opts.labelon }</span>
<span name="labelOff">{ opts.labeloff }</span>
</div>
<style>
<ac-popup>
<div class="popup-overlay" name="popup_overlay">
<div class="popup" name="popup">
<div class="header">
<h1 name="title">{ opts.title }</h1>
<h2 if="opts.subtitle">{ opts.subtitle }</h2>
<div class="close" onclick="{ closePopup }"></div>
</div>
@kazzkiq
kazzkiq / view.php
Last active August 4, 2016 21:14 — forked from anonymous/view.php
<?php
// keep track post values
$coord = $_REQUEST['coord'];
//recupera as coordenadas e atribui ao X e Y
list($x,$y) = explode(":",$coord);
?>
<!DOCTYPE html>
<html lang="en">
# PWA (Application)
server {
listen 80;
listen [::]:80;
server_name app.cryptoholder.com www.app.cryptoholder.com;
return 301 https://app.cryptoholder.com$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
@kazzkiq
kazzkiq / a.md
Last active March 23, 2017 23:39

1.0. Open NGINX config file (the one responsible for projects.peercoin.net)

1.1. Add this block as the first "location" block:

location ~ /.well-known {
	root /var/www/pc-showcase/;
	allow all;
}
@kazzkiq
kazzkiq / MenuInjector.js
Created April 7, 2017 02:43
Discourse topbar menu
(function (window) {
'use strict';
const MOBILE_WIDTH_LIMIT = 768;
const MENU_BAR_HEIGHT = 45;
let headerElement = document.querySelector('.docked .d-header') || false;
let menuElement;
function hideOnMobile () {
@kazzkiq
kazzkiq / UNO_TEST.js
Created April 25, 2017 22:34
UNO_TEST
(function(){function v(a,b){b.appendChild(a)}function r(a){a.parentNode.removeChild(a)}function y(a,b,c){for(;c<a.length;c+=1)a[c].destroy(b)}function m(a){return document.createElement(a)}function p(a){return document.createTextNode(a)}function t(a){for(var b=arguments,c=1;c<arguments.length;c+=1){var d=b[c],e;for(e in d)a[e]=d[e]}return a}function z(a,b,c,d){for(var e in b)if(e in c){var g=c[e],f=d[e];if(g!==f||g&&"object"===typeof g||"function"===typeof g){var h=b[e];if(h)for(var k=0;k<h.length;k+=
1){var l=h[k];l.__calling||(l.__calling=!0,l.call(a,g,f),l.__calling=!1)}}}}function K(a,b){function c(a){a=b.get();b.toggleMenu(a.isOpen)}var d,e,g=m("div");g.setAttribute("svelte-3393754602","");g.className=d="Uno_MenuWidget__handler "+a.classOpen;g.addEventListener("click",c,!1);var f=m("div");g.appendChild(f);v(p("\n "),g);f=m("div");g.appendChild(f);v(p("\n "),g);f=m("div");g.appendChild(f);var h=p("\n"),k=m("div");k.setAttribute("svelte-3393754602","");k.className=e="Uno_MenuWidget "+a.classOpen;
f=m("ul