Skip to content

Instantly share code, notes, and snippets.

@yinzara
yinzara / github_bitbucket_multiple_ssh_keys.md
Last active April 19, 2024 00:22
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@chockenberry
chockenberry / ContentView.swift
Created April 18, 2024 21:21
Observable with backing store
//
// ContentView.swift
// ObservableTester
//
// Created by Craig Hockenberry on 4/18/24.
//
import SwiftUI
class BackingStore {
@jpsim
jpsim / JAZMusician.h
Created July 7, 2014 09:25
SourceKit Playground
//
// JAZMusician.h
// JazzyApp
//
#import <Foundation/Foundation.h>
/**
JAZMusician models, you guessed it... Jazz Musicians!
From Ellington to Marsalis, this class has you covered.
@AnnoyingTechnology
AnnoyingTechnology / lenovo_legion_y530_linux_compatibility_issues_fix.md
Last active April 19, 2024 00:15
Lenovo Legion Y530 Linux issues and solutions for wifi and touchpad mostly (Debian & Ubuntu)

Intel i7-8750H nVidia GTX 1050 Ti

Summary of my findings (Please comment if you can get further than me) :

edit: 06/2019 guys in the comments have found workarounds and new solutions !

Most importantly : Lenovo refuses to provide any kind of support for their product on Linux, even though the computer is sold without an OS

Ubuntu 18.04

@cheeaun
cheeaun / mapbpx-tiles3dloader.js
Created October 9, 2021 01:29
Mapbox GL JS + Deck.gl Tiles3DLoader example
import MapboxLayer from '@deck.gl/mapbox/dist/esm/mapbox-layer';
import { Tiles3DLoader } from '@loaders.gl/3d-tiles';
import { Tile3DLayer } from '@deck.gl/geo-layers';
const buildingsLayer = new MapboxLayer({
id: 'buildings',
type: Tile3DLayer,
data: 'URL TO tileset.json',
loader: Tiles3DLoader,
loadOptions: {
@jaskiratr
jaskiratr / chmod-400.cmd
Created June 29, 2018 01:03
Set permission of file equivalent to chmod 400 on Windows.
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r
@troyfontaine
troyfontaine / 1-setup.md
Last active April 19, 2024 00:09
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@0mkara
0mkara / Ethereum_private_network.md
Last active April 19, 2024 00:09
Ethereum private network configuration guide.

Create your own Ethereum private network

Introduction

Used nodes:

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
Linux localhost.localdomain 4.14.5-200.fc26.x86_64 #1 SMP Mon Dec 11 16:29:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@mkropat
mkropat / knownpaths.py
Last active April 19, 2024 00:07
Python wrapper around the SHGetKnownFolderPath Windows Shell function
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)
@nufeng1999
nufeng1999 / InstallWSA.md
Last active April 19, 2024 00:02
[安装 Windows Subsystem for Android™️ ] 安装 Windows Subsystem for Android™️

1.获得 WAS 微软商店链接地址

https://www.microsoft.com/store/productId/9P3395VX91NR

2.下载 WAS 安装包

安装包抓包网址
https://store.rg-adguard.net/ 在这里输入上述商店链接,右边要选择Slow通道
(共有四个选项,分别是Fast,Slow,RP和Retail,分别对应Windows的Dev渠道,Beta渠道,RP渠道和正式版,目前只有Beta版本有发布)
找到最下面名为
"MicrosoftCorporationII.WindowsSubsystemForAndroid_*.msixbundle"
的包进行下载,即可获取最新的Beta版本的抓包