Skip to content

Instantly share code, notes, and snippets.

View I-NOZex's full-sized avatar
🎯
Focusing

Tiago Marques I-NOZex

🎯
Focusing
View GitHub Profile
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
@I-NOZex
I-NOZex / index.html
Created October 12, 2015 14:15 — forked from karbassi/index.html
How to handle single and double click events separately in javascript.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Single and Double Click</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="the_div"></div>
<span>Double click the block</span>
@I-NOZex
I-NOZex / gist:d244367b30c2eeef38f3c664aae7aa11
Created May 4, 2016 08:55 — forked from svlasov-gists/gist:2383751
JavaScript: merge two objects
function merge(target, source) {
/* Merges two (or more) objects,
giving the last one precedence */
if ( typeof target !== 'object' ) {
target = {};
}
for (var property in source) {
@I-NOZex
I-NOZex / input_cursor_color
Created June 1, 2016 16:58 — forked from JoeKeikun/input_cursor_color
How to change <input> input cursor color by css (webkit)
When I developed an app for ios by phonegap, I had a trouble in changing the <input> input cursor color.
but now, there is a solution for it:
---------------
<style>
input {
color: rgb(60, 0, 248); /* change [input cursor color] by this*/
text-shadow: 0px 0px 0px #D60B0B; /* change [input font] by this*/
-webkit-text-fill-color: transparent;
@I-NOZex
I-NOZex / gist:3fb38afcd378e1ce4e6cb36bed78a38c
Created July 13, 2016 22:00
PHP, PDO, EXPORT, EXPORT TO CSV: Use PDO to create a standalone php script for use in cron jobs where codeigniter urls can't be run by cron
<?php
if (isset($_SERVER['REMOTE_ADDR'])) {
die(':)');
}
echo "Cron is running";
$hostname = 'localhost';
$username = 'cl50-whiskey_p';
$password = 'rmBRsm!kK';
@I-NOZex
I-NOZex / node-and-npm-in-30-seconds.sh
Created October 4, 2016 14:20 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@I-NOZex
I-NOZex / loop.html
Created October 11, 2016 14:09 — forked from chrismay/loop.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<style type='text/css'>
</style>
@I-NOZex
I-NOZex / root.sh
Created October 27, 2016 10:05 — forked from Arinerron/root.sh
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";
@I-NOZex
I-NOZex / sass-header-tag.scss
Created February 23, 2017 16:14
SASS Snippet to target all header tags (from H1 to H6)
@for $index from 1 through 6 {
h#{$index}{
font: 32px/42px trajan-pro-1,trajan-pro-2;
}
}
@I-NOZex
I-NOZex / php.last-inserted-index.php
Created December 15, 2017 14:40 — forked from PabloVallejo/php.last-inserted-index.php
Get index of last inserted element in array
<?php
// Create array
$a = array();
// Add an item to it
$a[] = 1;
// Point to the last index of the array
end( $a );