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 / 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 / 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
[self.apiClient retrieveConnectedServicesWithSuccessBlock:^(NSDictionary *services) {
NSArray *facebookTokens = services[@"facebook"];
if (facebookTokens.count == 0) {
return;
}
NSDictionary *mostRecentFacebookTokenDict = facebookTokens[0];
NSNumber *refreshTimeNumber = mostRecentFacebookTokenDict[@"refreshTime"];
NSDate *refreshDate = [NSDate dateWithTimeIntervalSince1970:[refreshTimeNumber doubleValue]];