location ~ \.(woff|woff2|ttf|dds|map|js|css|jpg|png|gif|lang|ico|mp4|json) {
if ($request_uri ~* "^.*a\.js$ ") {
add_header Cache-Control no-store;
}
root /www-data/example1;
try_files $uri =404;
}
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 | |
while read CMD; do | |
# each command begins with *{number arguments in command}\r\n | |
XS=($CMD); printf "*${#XS[@]}\r\n" | |
# for each argument, we append ${length}\r\n{argument}\r\n | |
for X in $CMD; do printf "\$${#X}\r\n$X\r\n"; done | |
done < redis_commands.txt |
CREATE TABLE public.friend (
uid1 INTEGER,
uid2 INTEGER
);
CREATE INDEX index_uid1 ON friend USING BTREE (uid1);
REATE INDEX index_uid2 ON friend USING BTREE (uid2);
表friend
记录user1和user2是朋友关系,而且只会记录单方,(1,2)和(2,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
package main | |
import ( | |
"fmt" | |
"time" | |
"math/rand" | |
) | |
func main() { | |
c := fanIn(boring("joe"),boring("Ann")) |
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
def future_add_done_callback(future, callback): | |
if future.done(): | |
callback(future) | |
else: | |
future.add_done_callback(callback) |
NewerOlder