Skip to content

Instantly share code, notes, and snippets.

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@paulirish
paulirish / log-all-mutations.js
Created January 25, 2023 22:44
Log all DOM mutations to console
View log-all-mutations.js
// Log all DOM mutations to console.
// Modern interpretation of https://github.com/kdzwinel/DOMListenerExtension
observer = new MutationObserver(onMutation);
observerSettings = {
subtree: true,
childList: true,
attributes: true,
attributeOldValue: true,
@Klerith
Klerith / README.md
Last active March 9, 2023 00:36
Deprecated Method - Decorador
View README.md

@Deprecated - Method Decorator

En la definición del método, se puede marcar como obsoleto (deprecated) con la justificación. Esto ayudará a que otros developers sepán que deben de utilizar ya la alternativa.

@Deprecated('Most use speak2 method instead')
 speak() {
      console.log(`${ this.name }, ${ this.name }!`)
 }
@shurinskiy
shurinskiy / category_tree.php
Last active March 9, 2023 00:30
PHP. Рекурсивное построение дерева категорий из массива
View category_tree.php
/**
* Пример кода который будет упорядочивать рекурсивно массив и превращать его в дерево по
* идентификаторам родительских элементов - при этом он работает с произвольным уровнем вложенности.
* В этом примере, предпологается использование одной корневой категории, не имеющей потомков.
**/
$v_arr = array(
array(ID =>"0", name =>"корневая", parent=>"-1"),
array(ID =>"1", name =>"первая", parent=>"0"),
@joeyklee
joeyklee / mysql-setup-mac-with-sequel-pro.md
Last active March 9, 2023 00:29
Setting up mysql on mac with sequel pro and homebrew
View mysql-setup-mac-with-sequel-pro.md

Setup instructions

Setting up mysql on mac with sequel pro and homebrew

MacOS high sierra 10.13.6
Homebrew version 1.7.6

Assuming you've installed homebrew...

@KazaiMazai
KazaiMazai / CollectionView.swift
Last active March 9, 2023 00:25
SwiftUI wrapper for UICollectionView
View CollectionView.swift
import UIKit
import SwiftUI
public protocol SectionProtocol: Hashable {
associatedtype Item: Hashable
var items: [Item] { get }
}
extension CollectionView {
@aprilmintacpineda
aprilmintacpineda / Using Multiple SSH keys - Beginner Friendly.md
Last active March 9, 2023 00:23
Beginner Friendly: Using Multiple SSH keys
View Using Multiple SSH keys - Beginner Friendly.md

How to follow this guide

The problem

I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?

@sabas1080
sabas1080 / ESP32_HID.ino
Last active March 9, 2023 00:19
Example of HID Keyboard BLE with ESP32
View ESP32_HID.ino
/*
Copyright (c) 2014-2020 Electronic Cats SAPI de CV. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of