Skip to content

Instantly share code, notes, and snippets.

View bearzk's full-sized avatar

Kai Zhang bearzk

View GitHub Profile
@allenheltondev
allenheltondev / index.js
Last active November 12, 2022 22:30
Generic PATCH Lambda Function With Ops
const { marshall } = require('@aws-sdk/util-dynamodb');
const { DynamoDBClient, UpdateItemCommand } = require('@aws-sdk/client-dynamodb');
const ddb = new DynamoDBClient();
exports.handler = async (event) => {
try {
// Example input
// [
// { "op": "add", "path": "/comment", "value": "This is a nasty gopher" },
@carolynvs
carolynvs / .gitconfig
Last active October 19, 2022 14:44
git wip - Show what branches you have been working on lately
[alias]
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@stebennett
stebennett / feeds.opml
Created August 12, 2016 15:24
The feeds I currently subscribe to.
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Stephen subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Companies" title="Companies">
<outline type="rss" text="Trello" title="Trello" xmlUrl="https://trello.engineering/feed.xml" htmlUrl="http://tech.trello.com/"/>
<outline type="rss" text="IMVU" title="IMVU" xmlUrl="http://engineering.imvu.com/feed/" htmlUrl="https://engineering.imvu.com"/>
@josiahcarlson
josiahcarlson / steg.py
Last active December 17, 2015 05:39
Steganography in Python
# -*- coding: utf-8 -*-
'''
Steganogrphy in Python
Copyright 2013 Josiah Carlson
Released under the GNU LGPL v2.1 license
What, how, why, etc, are discussed:
http://www.dr-josiah.com/2013/05/steganography-in-python.html
@dps
dps / sudoku.py
Created December 29, 2012 17:00
def r(a):
i=a.find('0')
if i<0:print a
[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for
j in range(81)]or r(a[:i]+m+a[i+1:])for m in`14**7*9`]
r(raw_input())
@greatghoul
greatghoul / 265g_pics.py
Created September 26, 2012 17:22
265g.com 美图下载
#-*- coding: utf-8 -*-
import urllib, re, os, argparse
RE_NEXT_URL = ur'<a href=\"(?!javascript\:)([^\"]*?)">下一页<\/a>'
RE_PICTURE = ur'<p\s+(?:align=\"center\")>\s*<img.*?src=\"(.*?)\".*?\/?>'
RE_ARCTITLE = ur'var arctitle=\'(.*?)\';'
def get_html(url):
try:
return urllib.urlopen(url).read().decode('gbk')
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik