Skip to content

Instantly share code, notes, and snippets.

View jiamaozheng's full-sized avatar

Jiamao Zheng jiamaozheng

View GitHub Profile
# install_certifi.py
#
# sample script to install or update a set of default Root Certificates
# for the ssl module. Uses the certificates provided by the certifi package:
# https://pypi.python.org/pypi/certifi
import os
import os.path
import ssl
import stat
@jiamaozheng
jiamaozheng / github-actions-notes.md
Created June 11, 2023 17:13 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions
@jiamaozheng
jiamaozheng / aws.md
Created April 4, 2022 19:14 — forked from colinvh/aws.md
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@jiamaozheng
jiamaozheng / arm-template-parameters-definition.json
Created August 31, 2020 15:51 — forked from patpicos/arm-template-parameters-definition.json
arm-template-parameters-definition.json with exposed existingClusterId (line 79)
{
"Microsoft.DataFactory/factories/pipelines": {
},
"Microsoft.DataFactory/factories/integrationRuntimes":{
"properties": {
"typeProperties": {
"ssisProperties": {
"catalogInfo": {
"catalogServerEndpoint": "=",
"catalogAdminUserName": "=",

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@jiamaozheng
jiamaozheng / delete_versioned_s3_bucket.py
Last active May 3, 2018 23:06
This script is used to delete the versioned bucket.
#!/usr/bin/env python
# usages: python delete_the_versioned_s3_bucket.py -b <YOUR BUCKET NAME>
import boto3, argparse, sys
def delete_the_versioned_s3_bucket():
# setup commond line arguments
parser = argparse.ArgumentParser()
@jiamaozheng
jiamaozheng / aws_create_users_ubuntu.sh
Created April 21, 2018 19:07 — forked from vasansr/aws_create_users_ubuntu.sh
AWS User Data Script to create users when launching an Ubuntu server EC2 instance
#!/bin/bash
#
# Initial script to create users when launching an Ubuntu server EC2 instance
#
declare -A USERKEY
#
# Create one entry for every user who needs access. Be sure to change the key to their
@jiamaozheng
jiamaozheng / gist:5c0ca9caaba2a3fc69662aecfe484d73
Created April 16, 2018 03:52
Editing files from a remote ssh session with sublime via the use of rmate
1. Install rmate in your remote server (https://github.com/aurora/rmate)
sudo wget -O /usr/local/bin/rmate https://raw.github.com/aurora/rmate/master/rmate
sudo chmod a+x /usr/local/bin/rmate
2. Run "rmate <filename_to_edit>" command in your remote terminal,
and it will open the file locally in Sublime (make sure Sublime is already open on
your laptop before issuing the above command).
3. In order for this to work you must first do the following on your laptop:
@jiamaozheng
jiamaozheng / ffmpeg-concat.sh
Created January 1, 2017 01:32 — forked from fordaz/ffmpeg-concat.sh
concat multiple mp4 into a single one, extract audio as mp3
#!/bin/bash
# default group size (no grouping)
group_size=-1
# required to deal with file names containing blanks
OIFS="$IFS"
IFS=$'\n'
# parsing the -g command line argument
#import <UIKit/UIKit.h>
@interface TestTwoController : UIViewController <UITextFieldDelegate,UIPickerViewDataSource,UIPickerViewDelegate>
@end