Skip to content

Instantly share code, notes, and snippets.

View Nikkely's full-sized avatar
🍜
eating

Satoru Nihei Nikkely

🍜
eating
  • Tokyo
View GitHub Profile
@Nikkely
Nikkely / main.mjs
Created April 10, 2022 15:41
screeps_areenaのtutorial-final_testを攻略する思考停止meleeコード
import { getObjectsByPrototype } from '/game/utils';
import { Creep, StructureSpawn } from '/game/prototypes';
import { ERR_NOT_OWNER, ERR_NOT_ENOUGH_ENERGY, ERR_INVALID_ARGS, ERR_NOT_IN_RANGE, MOVE, ATTACK } from '/game/constants';
export function loop() {
var mySpawn = getObjectsByPrototype(StructureSpawn)[0];
var res = mySpawn.spawnCreep([ATTACK, MOVE]).object;
var myCreeps = getObjectsByPrototype(Creep).filter(creep => creep.my);
var enemyCreep = getObjectsByPrototype(Creep).find(creep => !creep.my);

isucon練習でやったこと

nginx

  • alp入れる
  • スレッド数増やす
  • ワーカ増やす
  • 静的ファイルは選んで圧縮する
  • キャッシュでレスポンス
@Nikkely
Nikkely / nginx.conf
Created September 6, 2019 15:00
何もわからん
user isucon;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 4096;
accept_mutex_delay 100ms;
}
"Marged"
for branch in `git branch -r --merged | grep -vE "/master$|/develop$"`
do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an" $branch | head -n 1` \\t$branch;
done | sort -r
"No-Marged"
for branch in `git branch -r --no-merged | grep -vE "/master$|develop$"`
do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an, %ae, " $branch | head -n 1` \\t$branch;
done | sort -r
@Nikkely
Nikkely / docker-compose.yml
Created May 13, 2019 09:12
redis replication on docker-compose
version: '3'
services:
redis:
image: redis:5.0.0
container_name: master
ports:
- "6379:6379"
networks:
- redis-replication
@Nikkely
Nikkely / typescript.ts
Last active April 4, 2019 06:46
typescript-vue-memo
import { Component, Prop, Emit, Watch, Vue } from 'vue-property-decorator';
@Component({
/** filters */
filters: {
convertUpperCase(value: string): string | null {
if (!value) {
return null;
}
return value.toUpperCase();