Skip to content

Instantly share code, notes, and snippets.

Addsearch http://addsearch.com $25+ per month

AWS CloudSearch (AWS | Amazon CloudSearch - Search Service in the Cloud)

Azure Search (Azure Search - Cloud Search Service | Microsoft Azure)

Cludo (https://www.cludo.com) (199$ per month)

Elasticsearch: RESTful, Distributed Search & Analytics (open source)

@abstraction
abstraction / _baseline.scss
Created March 9, 2020 19:00 — forked from razwan/_baseline.scss
Aligning type to baseline the right way with SASS
$base-font-size: 16px;
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
@abstraction
abstraction / hosts
Created March 10, 2020 01:26 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@abstraction
abstraction / private_fork.md
Created March 16, 2020 03:29 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@abstraction
abstraction / php-html-css-js-minifier.php
Created March 19, 2020 00:42 — forked from Rodrigo54/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {
@abstraction
abstraction / noreferrer.js
Created March 20, 2020 06:38 — forked from aladac/noreferrer.js
What is the most reliable way to hide / spoof the referrer in JavaScript?
// Source: http://stackoverflow.com/questions/8893269/what-is-the-most-reliable-way-to-hide-spoof-the-referrer-in-javascript
var isWebkit = document.createElement("a");
isWebkit.style.cssText = "-webkit-border-radius:1px;";
isWebkit = isWebkit.style.cssText.indexOf("radius") !== -1;
if (isWebkit) {
function hideRefer(e) {
var a = e.target;
if (a && a.tagName !== 'A') a = a.parentNode;
@abstraction
abstraction / node-and-npm-in-30-seconds.sh
Created March 27, 2020 20:25 — 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
@abstraction
abstraction / debugger pause beforeunload
Created March 29, 2020 15:35 — forked from carcinocron/debugger pause beforeunload
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@abstraction
abstraction / FrontendFrameworksPopularity.md
Created April 5, 2020 23:12 — forked from tkrotoff/FrontendFrameworksPopularity.md
Front-end frameworks popularity (React, Vue and Angular)

As of 2019/12/12

Findings: React is by far the most popular front-end framework (and continues to grow faster), except for the GitHub stars. In addition, React is more loved and "wanted" than other front-end frameworks (although it is more used: satisfaction tends to decrease with popularity).

Charts are from different sources and thus colors are inconsistent, read the chart's legends instead.

NPM downloads