Skip to content

Instantly share code, notes, and snippets.

View sapics's full-sized avatar

T. Nishino sapics

  • Kyoto, Japan
View GitHub Profile
@dck-jp
dck-jp / Program.cs
Created November 5, 2017 13:26
ChromeDriverUpdator .NET(C#)アプリ版
using Codeplex.Data;
using System;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Net.Http;
using System.Text.RegularExpressions;
namespace ChromeDriverUpdator
@afuggini
afuggini / defineProperty.js
Last active October 29, 2021 17:29
Object.defineProperty polyfill
/*!
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2015 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
*/
// vim: ts=4 sts=4 sw=4 expandtab
// Add semicolon to prevent IIFE from being passed as argument to concatenated code.
;
<!DOCTYPE html>
<html>
<head>
<!--
Copyright (c) 2014-2017, Jan Bösenberg & Jürg Lehni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@YukiYamashina
YukiYamashina / README.md
Last active October 21, 2020 08:45
QdmailをPHP7.0に対応させる

QdmailをPHP7.0に対応させる

  • コンストラクタ名を__constructorに修正
  • newの前の&を削除
  • QdmailComponent内のfunction & smtpObjectの引数をスーパークラスと合わせて$null = falseに修正
  • HTMLメールでのマルチパート順序をhtml, plain, OMITからplain, html, OMITへ変更
  • iPhone用アドレスをi.softbank.ne.jpからi.softbank.jpに修正
@yuroyoro
yuroyoro / Uber-migrated-pg-to-mysql.md
Created July 27, 2016 06:28
UberのPostgresqlからNoSQL on MySQLへの移行を読んでざっくりまとめた

Why Uber Engineering Switched from Postgres to MySQL - Uber Engineering Blog のまとめ

Posgresqlだと

  • pgは追記型なので少しの更新でも多くのdiskへのwriteがおきる
  • カラムを一つ更新しただけで多くのindexの書き換えが起こる
  • よって、replicationはWALを送るので更新が多いとWALが大量に送られる
  • repcliationでは物理的なdiskの変更を送る
  • DC間でレプリするときつい
  • bugがあってreplica間でMVCCの不整合が起きる
Replace with your own usename and email:
------------------------------------------------
git config --global user.name "Username"
git config --global user.email "username@example.com"
These next two commands tell Git to use your Windows credentials to store your origin password.
------------------------------------------------
git config --global credential.helper wincred
git config --global credential.helper store
@hashrock
hashrock / vuejs.md
Last active October 5, 2023 23:42
Vue.js資料まとめ(古いので注意)

#まず見るべき

以下のURLは、常に更新されているコンテンツです。

<html>
<!-- You may need to download them from https://github.com/brix/crypto-js/tree/release-3.1.2/build -->
<script src="rollups/sha1.js"></script>
<script src='components/lib-typedarrays-min.js'></script>
<body>
<script>
function sha1sum() {
var oFile = document.getElementById('uploadFile').files[0];
var sha1 = CryptoJS.algo.SHA1.create();
var read = 0;
@denji
denji / nginx-tuning.md
Last active May 21, 2024 18:18
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.