文档负责人:李渔
最后更新时间:2021年7月1日
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# overwrite master with contents of feature branch (feature > master) | |
git checkout feature # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge feature # source name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"regexp" | |
) | |
func main() { | |
e := `^(?P<length>\d+)(?P<unit>[dmy])$` | |
r := regexp.MustCompile(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Link: <https://gist.github.com/jellybeansoup/db7b24fb4c7ed44030f4> | |
# | |
# A command-line script for incrementing build numbers for all known targets in an Xcode project. | |
# | |
# This script has two main goals: firstly, to ensure that all the targets in a project have the | |
# same CFBundleVersion and CFBundleShortVersionString values. This is because mismatched values | |
# can cause a warning when submitting to the App Store. Secondly, to ensure that the build number | |
# is incremented appropriately when git has changes. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @start_key=1005069; | |
SET @paging_size = 20; | |
SELECT * FROM ( | |
SELECT | |
(@row_num:=@row_num + 1) AS `@row_num`, | |
(@row_num_in_page:=CASE | |
WHEN f.id = @start_key THEN 0 | |
WHEN @row_num_in_page>=0 THEN @row_num_in_page+1 | |
ELSE -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- What projects are you working on at home? | |
- What beta toys are you playing with? | |
- What source control do you use? | |
- How do you approach your documentation? | |
- Which tools do you use for keeping track of requirements? | |
- Give me an example of a project that completely failed? | |
- How do you design scalable applications? | |
- What language to you prefer for writing complex algorithms? | |
- Which tools are needed for testing the quality of your code? | |
- How to debug a web application from client, frontend, to backend? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR="$HOME/Desktop" | |
FILE="$DIR/.hidden_icons" | |
# hide icons for Windows VM | |
always_hide() { | |
chflags hidden $DIR/\$RECYCLE.BIN | |
chflags hidden $DIR/desktop.ini | |
} |
NewerOlder