Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / standalone-vivaldi-mac.md
Last active December 13, 2024 20:48
A small App that starts Vivaldi for Mac in such a way that it will store its profile within a subfolder (Useful for testing)

Vivaldi "Standalone Mode" on Mac

The following commands will produce a small application that allows you to run Vivaldi—or any other Chromium-based browser—in Standalone mode on a Mac. This could be used for testing a specific setup or version, without touching the system wide settings (profile). It can also be used to create a portable (USB install) of Vivaldi that you could store on an external disk, for sharing between computers.

Manual method

Start Terminal and issue the following:

mkdir -p Standalone\ Mode.app/Contents/MacOS
@gyengus
gyengus / espruino_pico_demo.js
Last active August 29, 2015 14:23
espruino_pico_demo
var l = false;
setInterval(function() {
l = !l;
LED1.write(l);
LED2.write(!l);
}, 500);
function readBTN() {
if (digitalRead(BTN1) == 1) {
@totya24
totya24 / jslogger
Created May 28, 2015 12:48
log js errors on server side
js: place in the head of html
<script type="text/javascript">
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
if (errorMsg.indexOf('Script error.') > -1) {
return;
}
var text = 'Err: ' + errorMsg + ' | Script: ' + url + ' | Ln: ' + lineNumber + (column ? ' | Clmn: ' + column : '') + (errorObj ? ' | Stacktrc: ' + errorObj : '');
var r = new XMLHttpRequest();
var params = "d=" + encodeURIComponent(text);
anonymous
anonymous / my.css
Created January 14, 2015 14:45
CSS Gradient Animation
background: linear-gradient(270deg, #c9dcd7, #80a097, #588f7f, #164034, #8b8b2a, #4f4f19, #c597dc, #8d2887, #3faede, #6b1631, #a5697c, #ebe7e8, #668d4a, #75d82d, #2a4417, #c76921);
background-size: 3200% 3200%;
-webkit-animation: AnimationName 59s ease infinite;
-moz-animation: AnimationName 59s ease infinite;
-o-animation: AnimationName 59s ease infinite;
animation: AnimationName 59s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
@mattdesl
mattdesl / README.md
Last active September 3, 2015 11:44
tiny modules

tiny modules

A common question: why would anyone publish a single-function module?

It might seem odd to have a module with just a single function (examples: clamp, is-dom, is-url, object-assign, point-in-polygon). Sometimes your tests and documentation are longer than the function itself. Let's examine some of the benefits to this approach...

  • a terse and frozen API does not end up with the scope creep or code rot that larger frameworks and "standard libraries" tend to carry.
  • it encourages diversity rather than "this is the one true way" (e.g. robust-point-in-polygon handles edge cases at so
@devoncarew
devoncarew / index.html
Last active February 9, 2022 21:23
Sunflower
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Dr. Fibonacci's Sunflower Spectacular</h2>
<div>
<canvas id="canvas" width="300" height="300"></canvas>
</div>
@PeterTheOne
PeterTheOne / index.html
Last active August 29, 2015 14:03
Style links by hreflang depending on the site lang. Inspired by http://lachy.id.au/log/2005/04/handy-css#language
<!doctype html>
<html lang="en"><!-- or "de" -->
<head>
<meta charset="utf-8" />
<title>Style links by hreflang</title>
</head>
<body>
<!-- this link will have "de" appended -->
<a href="http://petergrassberger.at/" hreflang="de">German Site</a>
<!-- this link will stay the same because the site lang is "en" -->
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active February 27, 2025 20:09
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
# NPM CheatSheet.
# Super easy intall: npm comes with node now.
# To create your own npm package: https://www.npmjs.org/doc/misc/npm-developers.html
# More: https://www.npmjs.org/doc/
# 1. NPM Command Lines.
# Local mode is the default.
# Use --global or -g on any command to operate in global mode instead.
@meagar
meagar / jsoffline.md
Last active August 14, 2018 09:28
Taking JavaScript Offline

Note: this presentation was written for Gistdeck. Add the bookmarklet, come back to this gist, click the bookmarklet, then use the arrow keys to navigate.

Note2: See https://github.com/meagar/taking-javascript-offline for code examples; any time a string like 2-basic-caching appears, that's a branch which supports that slide

Taking JavaScript Offline

Who am I?

@meagar