Skip to content

Instantly share code, notes, and snippets.

View mattn's full-sized avatar
🍛
I love curry 🍛

mattn mattn

🍛
I love curry 🍛
View GitHub Profile
def fizzbuzz(n):
for i in range(n):
if i % 3 == 0 and i % 5 == 0:
print("FizzBuzz")
elif i % 3 == 0:
print("Fizz")
elif i % 5 == 0:
print("Buzz")
else:
print(i)
package main
import (
"strconv"
"syscall"
)
func main() {
n := 600000 * 3
for i := 1; i <= n; i++ {

C言語

Version Number:   Windows NT 6.2 (Build 9200)
Exit Time:        1:58 am, Wednesday, October 4 2017
Elapsed Time:     0:00:00.826
Process Time:     0:00:00.828
System Calls:     1241731    
Context Switches: 9355       
Page Faults:      1449       
@mattn
mattn / log
Created September 23, 2017 12:45
ruby: [BUG] Segmentation fault
ruby 2.4.0p0 (2016-12-24 revision 57164) [x64-mingw32]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001f20 (none) [FINISH]
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0x14) [0x00007ff880445424]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObjectEx+0x9f) [0x00007ff87cb7988f]
@mattn
mattn / log
Created September 23, 2017 12:44
ruby: [BUG] Segmentation fault
ruby 2.4.0p0 (2016-12-24 revision 57164) [x64-mingw32]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001f20 (none) [FINISH]
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0x14) [0x00007ff880445424]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObjectEx+0x9f) [0x00007ff87cb7988f]
diff --git a/src/normal.c b/src/normal.c
index 6fffbcbc1..ef8f5d4cf 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5451,14 +5451,6 @@ nv_clear(cmdarg_T *cap)
#ifdef FEAT_SYN_HL
/* Clear all syntax states to force resyncing. */
syn_stack_free_all(curwin->w_s);
-# ifdef FEAT_RELTIME
- {
@mattn
mattn / aclog.go
Last active August 30, 2017 10:16
nginx のアクセスログからIP毎のアクセス回数(ステータス400以上)を表示するコード
package main
import (
"fmt"
"io"
"log"
"os"
"strconv"
"time"
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <psapi.h>
#include <tlhelp32.h>
#include <stdio.h>
typedef struct _STRING {
WORD Length;
WORD MaximumLength;
CHAR *Buffer;
function! s:bwipe(...)
bwipe!
endfunction
new
call timer_start(5000, function('s:bwipe'))
mingw32-make -f Make_ming.mak GUI=no IME=yes MBYTE=yes ICONV=yes ^
PERL=c:/mingw64/mingw64 DYNAMIC_PERL=yes PERL_VER=522 ^
PERLEXE=c:/msys64/mingw64/bin/perl.exe ^
PERLLIB=c:/msys64/mingw64/lib/perl5/core_perl ^
PYTHON=c:/msys64/mingw64 DYNAMIC_PYTHON=yes PYTHON_VER=27 ^
PYTHON_HOME=c:/msys64/mingw64 ^
PYTHONINC=-Ic:/msys64/mingw64/include/python2.7 ^
DYNAMIC_PYTHON_DLL=libpython2.7.dll ^
PYTHON3=c:/msys64/mingw64 DYNAMIC_PYTHON3=yes PYTHON3_VER=36 ^
PYTHON3_HOME=c:/msys64/mingw64/ ^