Skip to content

Instantly share code, notes, and snippets.

View 2get's full-sized avatar
๐Ÿ˜Œ
Think

Mayoto Yoshida 2get

๐Ÿ˜Œ
Think
  • GMO Pepabo, Inc.
  • Tokyo, Japan
View GitHub Profile
@2get
2get / gulp_tasks_test.js
Created March 15, 2015 11:45
BacktopJS (CasperJS) SSL Site Capture
var tests = ['--ssl-protocol=tlsv1', '--ignore-ssl-errors=true', 'capture/genBitmaps.js'];
var casperProcess = (process.platform === "win32" ? "casperjs.cmd" : "casperjs");
var casperChild = spawn(casperProcess, tests);
@2get
2get / ssl_proxy.conf
Last active August 29, 2015 14:17
Configure Nginx with non SSL and SSL as a Reverse Proxy for Local Application Server
server {
listen 80;
server_name dev.localhost;
client_max_body_size 300m;
proxy_set_header Host $http_host;
location / {
@2get
2get / sekigae2015.md
Created June 24, 2015 05:27
sekigae2015
cat names.txt | while read x; do echo -e โ€œ$RANDOM\t$x"; done | sort -k1,1n | cut -f 2- | paste - - - | column -t
cat names.txt | sort -R | paste - - - | column -t
@2get
2get / install_docker-compose_to_coreos.sh
Created September 6, 2015 07:02
Install docker-compose to CoreOS
#!/bin/bash
COMPOSE_VERSION=1.4.0
curl -L https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
sudo mkdir -p /opt/bin
sudo mv ~/docker-compose /opt/bin/docker-compose
sudo chown root:root /opt/bin/docker-compose
sudo chmod +x /opt/bin/docker-compose
@2get
2get / images.js.erb
Created May 20, 2016 06:45
Reference Rails asset images in JS
<%
imgs = {}
Dir.chdir("#{Rails.root}/app/assets/images") do
imgs = Dir.glob("**/*.{gif,jpg,jpeg,png}").inject({}) { |h, f| h.merge! f => image_path(f) }
end
%>
window.image_path = function(name) {
return <%= imgs.to_json %>[name];
};

Keybase proof

I hereby claim:

  • I am 2get on github.
  • I am 2get (https://keybase.io/2get) on keybase.
  • I have a public key ASD8ruy9U6hXCUimRp8sViACrZWizyF_DyI23n7yDZVUUwo

To claim this, I am signing this object:

@2get
2get / pepabo_managers_advent_calendar_2022_12_07.md
Created December 7, 2022 15:00
ๆ›ธใใ“ใจใŒใชใ„็Šถๆ…‹ใง่จ˜ไบ‹ใ‚’ๆ›ธใ

ๆ›ธใใ“ใจใŒใชใ„็Šถๆ…‹ใง่จ˜ไบ‹ใ‚’ๆ›ธใ

ๆ›ธใใ“ใจใŒใชใ„็Šถๆ…‹ใง่จ˜ไบ‹ใ‚’ๆ›ธใ
ใพใšใใฎใ‚ˆใ†ใช็Šถๆ…‹ใŒใชใœ็™บ็”Ÿใ™ใ‚‹ใฎใ‹
ใใ‚Œใฏใ‚ขใƒ‰ใƒ™ใƒณใƒˆใ‚ซใƒฌใƒณใƒ€ใƒผใซ็ฉบใ„ใฆใ„ใ‚‹ๆ—ฅใŒใ‚ใฃใŸใ‹ใ‚‰
็ฉบใ„ใฆใ„ใ‚‹ๆ—ฅใŒใ‚ใฃใŸใ‹ใ‚‰ไบˆๅฎšใ‚’ๆŠ‘ใˆใŸใฎใงใ‚ใ‚‹

ใ•ใฆใใฎๆฌกใซใ™ในใใฏใฉใ‚“ใช่จ˜ไบ‹ใ‚’ๆ›ธใใ‹ใ‚’่€ƒใˆใ‚‹ใ“ใจใงใ‚ใ‚‹
ใ‚ใŸใ—ใฏใƒšใƒ‘ใƒœใฎใƒžใƒใƒผใ‚ธใƒฃใƒผใŸใกใŒ้€ใ‚‹ใ‚ขใƒ‰ใƒ™ใƒณใƒˆใ‚ซใƒฌใƒณใƒ€ใƒผใซ็™ป้Œฒใ‚’ใ—ใŸใฎใงใ€ใƒžใƒใƒผใ‚ธใƒฃใƒผใซ้–ขใ—ใฆ่จ˜ไบ‹ใ‚’ๆ›ธใใฎใŒ่‰ฏใ„ใงใ‚ใ‚ใ†ใจ่€ƒใˆใŸ