Skip to content

Instantly share code, notes, and snippets.

View ixth's full-sized avatar
🎯
Focusing

Mikhail Menshikov ixth

🎯
Focusing
View GitHub Profile
@AnubisNekhet
AnubisNekhet / !Description.md
Last active May 15, 2023 04:19
Capacities-like sidebars

Preview

image

Caveats

Since the snippet utilises callouts, the sidebar disappears after a note is scrolled enough for the callout to be outside rendering range, i.e. it's best used for smaller notes. Smaller sidebar sizes are better in this case because there's more scroll area.

Usage

Use the capacities-sidebars.css as a snippet and paste the markdown into a new note.

@brunofbrito
brunofbrito / apps_install.sh
Last active June 24, 2024 11:25
Install my macOS apps with homebrew, cask and mas-cli
#!/bin/zsh
echo Time to install all apps at once!
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Installing Homebrew...
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo Installing Oh My Zsh...
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active July 21, 2024 20:48
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@Rich-Harris
Rich-Harris / service-workers.md
Last active July 10, 2024 17:04
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

#!/usr/bin/env python
"""
Converts Internet Explorer 'capture network traffic' XML to a HAR file.
Turns out that XML is just a HAR file anyways, but in XML form. So this
just converts it to JSON, and Bob's your uncle.
Requires Python 2.7+ and LXML.
"""
from __future__ import unicode_literals
@xjamundx
xjamundx / blog-webpack-2.md
Last active April 21, 2024 16:20
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@subzey
subzey / index.html
Last active August 29, 2015 14:20
Too Asynchronous
<!DOCTYPE html>
<html lang="en">
<head>
<title>Async test</title>
<meta charset="utf-8">
</head>
<body>
<pre></pre>
<script>
@martijnvermaat
martijnvermaat / ssh-agent-forwarding-screen.md
Created December 21, 2013 15:06
SSH agent forwarding and screen

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

@twolfson
twolfson / README.md
Last active January 22, 2024 07:33
How Python modules are resolved

Python modules have 2 syntaxes for importing.

import x
from x import y

import x

Absolute imports are used for importing top-level modules and only top level modules. These are ones that are globally installed, either inside of Python core or via a package manager (e.g. pip).