Skip to content

Instantly share code, notes, and snippets.

curl -X POST -H 'Content-Type: application/json' 'https://key:pass@chloes-shop.myshopify.com/admin/orders.json' -d '{"order": {"line_items": [{"variant_id": 1309367936,"quantity": 1 }]}}'
@abstraction
abstraction / SUBREDDIT_LIST.md
Created April 26, 2020 18:03 — forked from timvisee/SUBREDDIT_LIST.md
Get a list of subreddits you're subscribed to on reddit.

Get a list of your subreddits

To obtain a list of your subreddits, do the following:

  • First make sure you're logged in on reddit, on a desktop browser.
  • Then visit reddit.com/subreddits.
  • Then put the following snippet in your browsers address bar, and press Enter.
    Make sure javascript: is included at the beginning, your browser might remove it while copy-pasting for security reasons:
    javascript:$('body').replaceWith('<body>'+$('.subscription-box').find('li').find('a.title').map((_, d) => $(d).text()).get().join("<br>")+'</body>');javascript.void()
* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@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

@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 / 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 / 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 / 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 / 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