Skip to content

Instantly share code, notes, and snippets.

@jfcherng
jfcherng / .env
Last active April 29, 2024 11:42
Symfony 5 maintenance mode
MAINTENANCE_MODE=0
@ZipFile
ZipFile / README.md
Last active April 29, 2024 11:41
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 29, 2024 11:41
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@poychang
poychang / privacy-policy-template-eng.md
Last active April 29, 2024 11:39
隱私權條款範本

Privacy Policy Template

Welcome to [Your Website Name] (hereinafter referred to as "the Website"). In order to provide you with a secure and seamless experience while using the various services and information on our website, we are committed to protecting your privacy rights. Please read the following information carefully:

1. Scope of Privacy Policy

This Privacy Policy outlines how we handle the collection, processing, and utilization of personal identifiable information when you use our website's services. This Privacy Policy does not apply to other related websites not operated by us or to individuals not managed or commissioned by us.

2. Collection, Processing, and Utilization of Personal Data

@ntamvl
ntamvl / list-of-chrome-driver-command-line-arguments.md
Created January 30, 2019 04:20
List of Chrome Driver command line arguments

List of Chrome Driver command line arguments

Here is the list of Chrome Driver command line Arguments.

If you are using chrome Driver for Selenium WebDriver or Protractor or …. then these are a handy useful list of command line arguments that can be used.

You may use this to look at the usuage: https://code.google.com/p/chromium/codesearch#chromium/src/chromeos/chromeos_switches.cc

Run chromedriver –help to see command line arguments for your version.

@Zyndoras
Zyndoras / rotate.js
Last active April 29, 2024 11:41
Rotate base64 image (Javascript)
function rotate(srcBase64, degrees, callback) {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const image = new Image();
image.onload = function () {
canvas.width = degrees % 180 === 0 ? image.width : image.height;
canvas.height = degrees % 180 === 0 ? image.height : image.width;
ctx.translate(canvas.width / 2, canvas.height / 2);
@swordfeng
swordfeng / chn_fonts.reg
Last active April 29, 2024 11:36
Chinese font settings in wine
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
"Arial CE,238"="wqy-microhei.ttc"
"Arial CYR,204"="wqy-microhei.ttc"
"Arial Greek,161"="wqy-microhei.ttc"
"Arial TUR,162"="wqy-microhei.ttc"
"Courier New"="wqy-microhei.ttc"
@robroc
robroc / hdbscan_map_clusters.py
Last active April 29, 2024 11:35
An example of clustering points of a map with HDBSCAN and using weighted averages to find the optimal cluster center
# Thanks to Leland McInnes (@leland_mcinnes) for devising the weighting solution
import hdbscan
# https://hdbscan.readthedocs.io/en/latest/index.html
import numpy as np
"""Assume df is a pandas dataframe with latitude and longitude columns in WGS84"""
# Define a cluster selection epsilon to group points within this distance.
@nicokruger
nicokruger / git-foreach.sh
Created March 18, 2012 16:42
Execute a command for all commits in a git repository.
#!/bin/bash
if ! [ -d ".git" ]; then
echo "Script must be run from within a git repository"
exit 1
fi
if [ $# -ne 1 ]; then
echo "Please specify a script to execute for each commit"
echo "Script will recieve <repo_dir> <commit ref> as arguments"