Skip to content

Instantly share code, notes, and snippets.

work work work

Andreas Kar thexmanxyz

work work work
View GitHub Profile
garyharan / _mixins.scss
Created May 5, 2011
Useful scss mixins (rounded corners, gradients, text-field, button)
View _mixins.scss
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
flexelem /
Created Jun 8, 2014
A min heap implementation in java.
import java.util.ArrayList;
public class MinHeap {
private ArrayList<Integer> list;
public MinHeap() {
this.list = new ArrayList<Integer>();
Air-Craft / jquery.plugin-template.js
Created Oct 20, 2011
jQuery Plugin Design Pattern/Template Improved!
View jquery.plugin-template.js
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging
* A modified (improved?) version of the jQuery plugin design pattern
* See (near the bottom) for details.
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace
* - Ensures ability to use '$' even in compat modes
celly / gist:1591cf9305734812baad
Last active May 23, 2020
Personal Deny list for Pi-Hole
View gist:1591cf9305734812baad
# link:
# Add to you /usr/local/bin/ file under sources=
# samsung 'smart tv'
richstrauss / floating-back-to-top-button.html
Last active May 6, 2020
Floating Back to Top Button in the Corner
View floating-back-to-top-button.html
// Add an anchor link somewhere in your HTML page, by adding a unique class name.
// Preferably add it somewhere outside from any containers, so we can add the fixed position to our floating back to top button.
<a href="#" class="back-to-top">Back to Top</a>
// OR, if you don't have access to html source you can create the link using some jQuery.
// Make sure to add the script below above the ending of </body> tag.
// Don't forget to get jQuery library files and add it above the ending tag of </head>.
gunjanpatel /
Last active Nov 28, 2019
Write subquery in Joomla 3 using JDatabase method.

Here is an example of write subquery in Joomla! 3 using JDatabase method.

// Initialize variables.
$db       = JFactory::getDbo();
$subQuery = $db->getQuery(true);
$query    = $db->getQuery(true);

// Create the base subQuery select statement.
PhilETaylor / masterplugin.php
Last active Mar 28, 2019 — forked from jneubauer/masterplugin.php
Joomla! plugin that fires all possible plugin events
View masterplugin.php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class PlgSystemMasterplug extends JPlugin
function onExtensionBeforeInstall(){
JLog::add(JText::_('onExtensionBeforeInstall'), JLog::WARNING);
franzenzenhofer / hl-en-bookmarklet
Created Mar 14, 2019
change any google page to english language
View hl-en-bookmarklet
let l = window.location;
const p = new URLSearchParams(;
//minified bookmarklet code
//javascript:let l=window.location,p=new URLSearchParams(;p.set("hl","en");"?"+p.toString();
jneubauer / masterplugin.php
Last active Feb 16, 2018
Joomla! plugin that fires all possible plugin events
View masterplugin.php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class PlgSystemMasterplug extends JPlugin
function onUserAuthenticate()
error_log('onUserAuthenticate', 0);
amintos /
Created Jul 6, 2013
Simple LZ-Like compression in Java.
/** Fast and simple text compression.
* This is a modified variant of LZ77:
* The algorithm inserts "marker bytes" whose bits state which
* of the following 8 symbols are actual symbols (0) or backward
* references (1). Backward references are actually two bytes, the
* first 6 bits encoding the length and the next 10 bits encoding
* the negative offset where the repetition occurred.
* The idea is related to LZO and LZJB compression.