Skip to content

Instantly share code, notes, and snippets.

View hangingman's full-sized avatar
🦙

hangedman hangingman

🦙
  • Kanagawa, Japan
  • 18:46 (UTC +09:00)
View GitHub Profile
@teasherm
teasherm / s3_multipart_upload.py
Last active March 4, 2025 21:55
boto3 S3 Multipart Upload
import argparse
import os
import boto3
class S3MultipartUpload(object):
# AWS throws EntityTooSmall error for parts smaller than 5 MB
PART_MINIMUM = int(5e6)
@rLinks234
rLinks234 / mmap_exec_ex1.cpp
Created January 31, 2017 06:09
Memory map executable code boilerplate (with mmap)
///
/// Author: Daniel Wright
///
/// Linux compile:
/// ${CC} -fPIC -fpie -std=c++14 -fno-exceptions -fno-rtti -lstdc++ -lm -lc -ldl mmap_exec_ex1.cpp -o mmap_exec_ex1
///
/// Tested on Android 7.1.1 (x86 emulator), as well as Ubuntu 16.04 (Core i5 3570k [targeting x64] using kernel 4.4.0-59)
#include <dlfcn.h>
#include <stdint.h>
@timakin
timakin / go-job-worker.md
Last active June 6, 2024 07:06
Go製ジョブワーカーライブラリの比較

ライブラリ検索するときに便利 -> https://golanglibs.com

  • benmans/goworker(1584 stars)
    • redis-backed
    • Go製のジョブワーカーでは一番メジャーぽい
    • 当初Enqueueがなかったようだが、2015/12に追加されてる: 参考
    • リポジトリ自体は4年前からあって、7か月前にも更新はされてる
  • rallison/go-workers(816 stars)
    • redis-backed  - 機能的にはgoworkerとほぼ変わらなさそう
@gakuzzzz
gakuzzzz / sbt-coursier.md
Last active June 27, 2019 03:23
あなたの sbt update を爆速にする sbt-coursier の紹介

あなたの sbt update を爆速にする sbt-coursier の紹介

この記事は Scala Advent Calendar 2016(Adventar) 10日目の記事です。

今は 12/10 の 625時です。年明けなんて無かった。いいね?

さてさて、sbt の依存jarのダウンロードが遅い、というのは割とよく言われる事であります。

で、この原因の一旦に、sbtが Apache Ivy を使っている、という点があります。

@yukihirop
yukihirop / match_hash.rb
Last active April 8, 2022 01:10
RspecでJSON形式のハッシュをFactoryGirlなどで用意したデータでテストする際に使えるCustomMatcher
# GitHub Gist
# kroehre/ gist:9cc209bcf43a1d1b001b
# より引用&一部改造
# @abstract json形式のhashのkeyの数と値、hashの構造、keyとvalueのペアの一致(hash完全一致、順不同)
# などをテストする.
# @params [Hash] un_jsonalized_expected これからjson形式のhashにするためのhash.
# @params [String] *spec_ignore_keys specを無視するkeyの配列.
# @example *spec_ignore_keysはない場合はnilをある場合は、複数文字列で書いて下さい.
# expect(result).to match_hash_after_jsonalized(data,nil)
v*[0-9].*[0-9].*[0-9]*(-rc*(.*[0-9]))
@tonycox
tonycox / bigtop on ubuntu
Last active February 12, 2021 10:18
how i install bigtop 1.1.0 on ubuntu 16.04
sudo apt-get update && apt-get upgrade
# install java (homedir - /usr/lib/jvm/java-8-oracle/)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
# or use this to set as default -> sudo apt install oracle-java8-set-default
# install maven (homedir - /usr/share/maven)
@sanderd
sanderd / spreadingactivation.adoc
Created September 26, 2016 10:13 — forked from gerbrand/spreadingactivation.adoc
Demonstration spreading activation in Neo4j

Spreading activation in Neo4j

Introduction

How does the human brain work? How do thoughts pop up in our conscience? Just thinking about the question is confusion enough. Maybe our brain works as a semantic network as explained by Carole Yue at Kahn Academy.
Try for yourself: think of a bird? You probably think a sparrow, duck. Think of an extinct animal? Now you might think of the dodo, mammoth or dinosaur. Animal living on the south pole: a penguin? Or polar bear?

Facts, ideas, memories in our brain are interconnected. They’re not structured into tables like in relational databases or hierarchical in directories on a harddrive: if I’d ask you to name all the birds you know, you won’t give me a long list immediately. A better model of human m

@hayajo
hayajo / fabfile.py
Last active December 9, 2020 05:04
Fabricでステージごとにenvを切り替える
# -*- coding: utf-8 -*-
from fabric.api import task
from fabric.api import env
# コマンドラインから`stage.production`ではなく`production`と指定できるように関数をインポートする
from stage import production, integration, staging, testing, development
import myapp # アプリケーションごとにモジュールをわける
# import myapp2
@peterspackman
peterspackman / mingw-w64-x86_64.cmake
Last active April 1, 2025 13:46
cmake toolchain file for mingw-w64 x86_64 builds on Ubuntu
# Sample toolchain file for building for Windows from an Ubuntu Linux system.
#
# Typical usage:
# *) install cross compiler: `sudo apt-get install mingw-w64`
# *) cd build
# *) cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw-w64-x86_64.cmake ..
# This is free and unencumbered software released into the public domain.
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)