Skip to content

Instantly share code, notes, and snippets.

View diskshima's full-sized avatar

Daisuke Shimamoto diskshima

View GitHub Profile
@kaaquist
kaaquist / podman_macos.md
Last active April 2, 2024 13:20
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@rxwei
rxwei / upstreaming-swift-autodiff.md
Last active January 28, 2020 11:06
Upstreaming Swift AutoDiff

Upstreaming Swift AutoDiff

Author: Richard Wei (rxwei@google.com) on behalf of the Swift for TensorFlow team

Last updated: October 2, 2019

Overview

The differentiable programming feature (AutoDiff) has been incubated in the 'tensorflow' branch of apple/swift since December 2017 and released as part of the Swift for TensorFlow toolchains. The Differentiable Programming Mega-Proposal, which serves as a manifesto, received general positive feedback from the community, but there is a long way between receiving conceptual approval and obtaining Swift Evolution approval of such a large feature. We would like to merge the pieces into the 'master' branch under a gate to further development and bake the feature on master, just like Apple develops its major features

@matiaskorhonen
matiaskorhonen / sign-pdf.rb
Last active May 25, 2023 10:58
Quick and dirty PDF signing in Ruby (using Origami)
#!/usr/bin/env ruby
require "openssl"
require "time"
begin
require "origami"
rescue LoadError
abort "origami not installed: gem install origami"
end
@marty-wang
marty-wang / gist:5a71e9d0a6a2c6d6263c
Last active February 13, 2024 07:34
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@madwork
madwork / decode_session_cookie.rb
Last active October 22, 2020 18:13 — forked from profh/decode_session_cookie.rb
Rails 4.1+ Decode Session
@mauron85
mauron85 / nginx-lang.lua
Last active September 3, 2023 06:31
Detect preferred language script for Nginx written in LUA
-------------------------------------------------------------------------------
-- HTTP Accept-Language header handler --
-- @originalAuthor: f.ghibellini@gmail.com --
-- @originalRepository: https://github.com/fghibellini/nginx-http-accept-lang--
-- @modifiedBy: marian.hello@mapilary.com --
-- @gist: https://gist.github.com/mauron85/47ed1075262d9e020fe2 --
-- @license: MIT --
-- @requires: --
-- @description: --
-- returns language with greatest quality --
@udzura
udzura / LICENSE
Last active May 8, 2021 14:23
やわらかRuby
やわらかRubyはCC BY 4.0 で提供します。
詳細: https://creativecommons.org/licenses/by/4.0/deed.ja
This work is licensed under a Creative Commons Attribution 4.0 International License.
See also: https://creativecommons.org/licenses/by/4.0/deed
@ryo-murai
ryo-murai / sprintdatajpa.md
Created September 18, 2012 04:57
Spring DATA JPA概要

Spring DATA JPA

はじめに

  • Spring DATA JPAは、Spring Frameworkの拡張ライブラリ。springframework-jdbcシリーズか springframework-ormシリーズのようだが、安定したら本流に組み込まれるのかもしれない。
  • この記事の執筆時点のバージョンは SPRING DATA JPA 1.1.0 GA
  • Spring DATA JPAは、JPAの機能をベースに 汎用的な Repositoryの機能を提供する。
  • ちなみに、Repositoryというのは、ドメイン駆動設計(Domain Driven Design)のパターンのひとつで、ドメインのEntityのCollectionのように振舞う責務を持つ。例えば CustomerRepositoryならば、システムに存在するCustomer EntityたちをCollectionに保持するかのように振舞う。
  • PoEAAにもある。参照
  • もちろん本当のCollectionに保持したら大変なことになるので、バックエンドではデータベースアクセスが行われたりするわけだが、そういったことを抽象化する。
@philwo
philwo / attributes-default.rb
Created July 5, 2012 06:04
Chef cookbook for nginx + passenger (compiled from source)
default['nginx']['version'] = "1.2.0"
default['nginx']['passenger']['version'] = "3.0.12"
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a