Skip to content

Instantly share code, notes, and snippets.

View cyhsutw's full-sized avatar

Cheng-Yu Hsu cyhsutw

View GitHub Profile
@cyhsutw
cyhsutw / podman_macos.md
Created April 15, 2022 08:17 — forked from kaaquist/podman_macos.md
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@cyhsutw
cyhsutw / gracefully-shutdown-sidekiq.yml
Last active February 11, 2024 02:39
Stop Sidekiq and complete Lifecycle hooks using AWS Systems Manager Automation - https://grass-fed.engineer/2021/10/24/tracing-down-lost-sidekiq-jobs/
description: Gracefully stop sidekiq and complete lifecycle hook action
schemaVersion: "0.3"
assumeRole: "{{ role }}"
parameters:
role:
description: ARN of the role for execution
type: String
autoscalingGroupName:
type: String
instanceId:
@cyhsutw
cyhsutw / gpg-import-and-export-instructions.md
Created October 11, 2016 10:57 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@cyhsutw
cyhsutw / MathJax.ipynb
Last active August 31, 2023 05:43
Grabbed from https://github.com/odewahn/ipynb-examples, converted to v3 for GitHub to render.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cyhsutw
cyhsutw / GSoC 2016 Final Evaluation.md
Last active August 22, 2016 15:33
Google Summer of Code 2016 Final Evaluation: Enhancements for GitHub Classroom

Google Summer of Code 2016 - Enhancements for GitHub Classroom

By Cheng-Yu Hsu (@cyhsutw)

Overview

After discussing with my mentors @johndbritton and @tarebyte, the main goals of the project are deliver few features about monitoring progress, which include:

  • Repository creation
@cyhsutw
cyhsutw / 10.txt
Last active May 31, 2016 12:58
player data
1400803200 NaN
1400889600 NaN
1400976000 NaN
1401062400 NaN
1401148800 NaN
1401235200 NaN
1401321600 NaN
1401408000 NaN
1401494400 NaN
1401580800 NaN
@cyhsutw
cyhsutw / Spinner.h
Last active November 29, 2015 00:10
Gradient Ring
//
// Spinner.h
//
// Created by Cheng-Yu Hsu on 11/28/15.
//
#import <UIKit/UIKit.h>
@interface Spinner : UIView
@cyhsutw
cyhsutw / README.md
Last active August 29, 2015 14:19
Parse Comments
@cyhsutw
cyhsutw / xor_helper.rb
Last active August 29, 2015 14:17
Service Security HW-01 by Triforce 5
# Authors:
# => Jevon Mckenzie
# => Amon Bazongo
# => Cheng-Yu Hsu
# XorHelper provides an encode method to xor a file with a key
module XorHelper
# XOR encodes/decodes a document with a key
# Parameters:
@cyhsutw
cyhsutw / ruby_notes.md
Last active August 29, 2015 14:16
Ruby Notes

Usage of unless

Play a game unless you're tired. If you're tired, go to bed.

unless tired
 puts "Play games" 
else
  puts "Go to bed"
end