Skip to content

Instantly share code, notes, and snippets.

@faurehu
faurehu / roamAliasPlugin.js
Created January 23, 2021 01:34
Roam Alias Plugin
window.onhashchange = function () {
var isPage = window.location.hash.split('/')[3] == 'page'
if (isPage) {
setTimeout(function () {
var topBlock = document.getElementsByClassName("roam-block")[0].children[0]
var blockValue = topBlock.innerText.split(':')
if (blockValue.length == 2 && blockValue[0] == 'forward') {
var attrs = topBlock.children[1].attributes[1]
if (attrs.name == 'data-link-uid') {
var newUrl = window.location.href.slice(0, -9) + attrs.value
@dankor
dankor / README.md
Last active January 11, 2025 20:59
Як отримувати гроші з Upwork через свого ФОПа

Як отримувати гроші з Upwork через свого ФОПа

Це коротка інструкція про те, як бути білим фрілансером. Почав писати для себе, бо не все знайшов в інтернеті. І вирішив, що це корисно всім, хто працює на біржі Upwork і хоче розібратися як легально там заробляти. Тут є офіційна стаття, яку я вирішив доповнити конкретним своїм прикладом.

Що для цього потрібно?

  • Мати відкритого фопа з відповідними кведами
  • Мати відкритий фопівський гривневий і доларовий рахунки

ФОП

Про відкриття фопа і його облікування не буду розписувати. Якщо у вас фопа немає, то краще звернутися до консалтингових компаній, які на цьому спеціалізуються. Єдине, на чому я хотів би зупинитися, це кведи. Бажано, щоб вони збігалися з послугами, які ви надаватимете. Наприклад, «Software Development» відповідає найкраще «62.01 Комп'ютерне програмування». Якщо у вас інші, то пошукайте те, чому найбільше відповідаєт

@jborichevskiy
jborichevskiy / jon-roam-daily-template.md
Last active August 31, 2022 04:41
The daily template I use for Roam Research https://roamresearch.com/
  • Weekly Agenda (created on a different day, and embedded with /Block Reference)
  • [[Morning Questions]]
    • {{[[slider]]}} How many hours of sleep did I get?
    • What's one thing top of mind today?
    • What's the one thing I need to get done today to make progress?
    • Review #[[Index: Questions]] #values
  • Agenda
    • {{[[TODO]]}} Morning walk #goal-health #habit
    • {{[[TODO]]}} Check calendar for scheduled events
  • {{[[TODO]]}} Morning focus hour
@MaggieAppleton
MaggieAppleton / roam-kanban.css
Created February 3, 2020 09:22
Roam Kanban Styling
.kanban-board {
background-color: #fff;
}
.kanban-card {
background-color: white;
margin: 8px;
box-shadow: 0px 1px 2px #9EB3C0;
padding: 10px;
border-radius: 2px;
@carolineschnapp
carolineschnapp / hide variant images.md
Created February 18, 2016 20:11
Hide variant images on the product page, so that a variant image is shown as main image only when its corresponding variant is selected.

The goal

Hide the thumbnails of variant images on the product page.

How to do that

  1. Add a class of 'variant-image' to the wrapper of each thumbnail that is a variant image. See first product.liquid snippet.
  2. Hide all .variant-image elements with CSS in the theme's stylesheet. See second style.scss.liquid snippet.
@ajmalafif
ajmalafif / gist:14a7eae3ac540610743d
Created November 1, 2015 14:11 — forked from nternetinspired/gist:7482445
Load Disqus comments only on demand if you give a shit about page weight and your visitors. Even with no comments, i.e. an empty comment form, calling Disqus will load an extra 226Kb. If your page has comments this can be far higher. This Gist accompanies my blog post: http://internet-inspired.com/wrote/load-disqus-on-demand/
// Requires jQuery of course.
$(document).ready(function() {
$('.show-comments').on('click', function(){
var disqus_shortname = 'YOUR-DISQUS-USERNAME'; // Replace this value with *your* username.
// ajax request to load the disqus javascript
$.ajax({
type: "GET",
url: "http://" + disqus_shortname + ".disqus.com/embed.js",
dataType: "script",
@carolineschnapp
carolineschnapp / Size Chart in Brooklyn.md
Created May 27, 2015 23:25
How to add a Size Chart button to the #Brooklyn theme. This uses the Magnific Popup plugin that comes with the theme.

What you want

You want a See Size Chart button on the product page:

Alt text

... that once clicked gives you this:

Alt text

@kyleaparker
kyleaparker / gist:b9fd3e4f7532f9f19658
Last active October 5, 2023 19:54
[Shopify] Display articles alphabetically
{% assign articles = blogs.news.articles | sort: 'title' %}
{% for article in articles %}
{{ article.title }}<br>
{% endfor %}
@kyleaparker
kyleaparker / gist:928c5925dc07ffe487ba
Created June 11, 2014 20:50
[Shopify] Show option as plain text if there is only one option in the dropdown
$('.single-option-selector').each(function() {
var numOptions = $(this).children().length;
if(numOptions == 1) {
$(this).hide();
$(this).before( "<p>" + $(this).val() + "</p>");
}
});