Skip to content

Instantly share code, notes, and snippets.

@weisk
weisk / multiple_ssh_setting.md
Created March 29, 2021 17:10
Multiple SSH keys for different github accounts

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 "[email protected]"
@weisk
weisk / email_parse_url.py
Created April 1, 2021 05:32 — forked from aptgetupgrade/email_parse_url.py
code to poll emails from an IMAP email server and post these to wallabag
# Read email in inbox, look for any URLs and update them to wallabag, delete email if URLs found in it.
# Built from various internet sources. Final code donated under GPL v3 by Github user aptgetupgrade
# Tested using python 2. Could be run as part of a crontab, e.g. every 5 mins.
#
import sys
import imaplib
import getpass
import email
import email.header
import datetime
@weisk
weisk / script.sh
Created April 9, 2021 03:20 — forked from xphere/script.sh
Bash script skeleton
#!/bin/bash
settings() {
SCRIPT_DIR="$(dirname "$0")"
}
main() {
request $@
settings
run
->Setting processData to false lets you prevent jQuery from automatically transforming the data into a query string.
And Setting the contentType to false is imperative.
Refference link: https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
//01// File Upload using FormData Object in Javascript
Syntax:
var formData = new FormData(); // Currently empty
formData.append(name, value); // custom text field where key/value pair
formData.append(name, value, filename); // Custom file uploading
@weisk
weisk / 55-bytes-of-css.md
Created September 25, 2022 20:46 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}