This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*[class]:before { | |
position: absolute; | |
background: rgba(10,10,10,.6); | |
padding: 10px; | |
border-radius: 4px; | |
color: white; | |
font-size: 10px; | |
display: block; | |
content: "[" attr(class) "] " ; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ColorCLI { | |
static $foreground_colors = array( | |
'bold' => '1', 'dim' => '2', | |
'black' => '0;30', 'dark_gray' => '1;30', | |
'blue' => '0;34', 'light_blue' => '1;34', | |
'green' => '0;32', 'light_green' => '1;32', | |
'cyan' => '0;36', 'light_cyan' => '1;36', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# https://gist.github.com/nicklasos/7b83682aedf4198be9c0 | |
# Progress: 49% | |
function simple_progress($text, $value) | |
{ | |
echo "\r{$text}: {$value}%"; | |
flush(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.sitepoint.com/command-line-api-fun-profit/ | |
// Debug the webpage and check that if the layout is as per desire or not. | |
[].forEach.call($$("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)}); | |
// Extract all the image sources of a web site | |
var pics = $$("img"); | |
// var pics = $$("img.-cx-PRIVATE-Photo__image"); // instagram images | |
for (pic in pics) { | |
console.log(pics[pic].src); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
// Define the constructor | |
this.Modal = function () { | |
// Create global element references | |
this.closeButton = null; | |
this.modal = null; | |
this.overlay = null; | |
// Define options defaults |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
set_error_handler('errorHandler'); | |
set_exception_handler('exceptionHandler'); | |
function errorHandler ($level, $message, $file, $line) | |
{ | |
if (error_reporting() !== 0) { // to keep the @ operator working | |
throw new \ErrorException($message, 0, $level, $file, $line); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts] | |
"Segoe UI (TrueType)"="" | |
"Segoe UI Black (TrueType)"="" | |
"Segoe UI Black Italic (TrueType)"="" | |
"Segoe UI Bold (TrueType)"="" | |
"Segoe UI Bold Italic (TrueType)"="" | |
"Segoe UI Emoji (TrueType)"="" | |
"Segoe UI Historic (TrueType)"="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Author: Rahul Thakare | |
:: Email: [email protected] | |
:: Github: www.github.com/bantya | |
:: Purpose: Easy change directory command for cmd | |
:: Created: 23062017 | |
set Dir=%1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Author: Rahul Thakare | |
:: Email: [email protected] | |
:: Github: www.github.com/bantya | |
:: | |
:: To have custom cmd prompt. | |
[1;36mbantya[0m @ [1;35mthAKare[0m$S::$S[[1;33m$p[0m]$_[1;32m$$[0m$S | |
bantya @ thAKare :: [C:\Users\thAKare] | |
$ _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- select all query -- | |
SELECT b.bookTitle, a.authorName FROM book b | |
INNER JOIN author_book ab ON ab.bookID = b.bookID | |
INNER JOIN author a ON a.authorID = ab.authorID | |
ORDER BY b.bookTitle | |
-- select all with authors concantenated -- | |
SELECT b.bookTitle, GROUP_CONCAT(a.authorName) authors FROM book b |