Skip to content

Instantly share code, notes, and snippets.

View mechiland's full-sized avatar
🧘
What's Next?

Michael Chen mechiland

🧘
What's Next?
  • Hipacloud
View GitHub Profile
@acidtib
acidtib / readme.md
Created August 28, 2023 17:56
kamal + github actions

Example of Kamal deployment from Github Actions.

Add your applications .env variables to the Github repo as a repository secret, you can find this under the repo settings => secrets and variables => actions

https://github.com/username/repo_name/settings/secrets/actions

you are going to need an ssh private key that your deployment server is aware of (add public key to servers .ssh/authorized_keys) and add the ssh private key as a repo secret

create action workflows

@fernandoaleman
fernandoaleman / mysql2-catalina.md
Last active July 11, 2023 02:11
Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Catalina with MySQL 5.7.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl
@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@fearblackcat
fearblackcat / proxy_for_terminal.md
Last active June 27, 2024 08:17
Set proxy for terminal on mac

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@adidahiya
adidahiya / _control.scss
Last active June 23, 2021 01:27
blueprint-react-select
// Copyright 2017 Palantir Technologies, Inc. All rights reserved.
// Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy
// of the license at https://github.com/palantir/blueprint/blob/master/LICENSE
// and https://github.com/palantir/blueprint/blob/master/PATENTS
@import "~@blueprintjs/core/src/components/forms/common";
@import "./common";
// ReactSelect does not conform to our naming scheme
// stylelint-disable selector-class-pattern
@lawso017
lawso017 / mentionable_trix.js.coffee
Last active July 6, 2022 10:13
@mentions with trix-editor and selectize.js
window.addEventListener "trix-initialize", (e) =>
Utility.TrixMentions.prepare($(e.target))
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@chen206
chen206 / wechat_getappmsgext.py
Last active January 8, 2022 13:34
微信公众号文章抓取阅读数和点赞数
# !/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
from urlparse import urlparse, parse_qs
import requests
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@janx
janx / slanger_nginx_lb.conf
Created May 5, 2014 05:09
Use nginx as load balancer for Slanger
upstream slanger_ws {
server 127.0.0.1:8001;
server 127.0.0.1:8002;
server 127.0.0.1:8003;
server 127.0.0.1:8004;
server 127.0.0.1:8005;
server 127.0.0.1:8006;
server 127.0.0.1:8007;
server 127.0.0.1:8008;
}