This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from __future__ import absolute_import, unicode_literals | |
from collections import defaultdict | |
import commands | |
from multiprocessing import Process | |
from django.conf import settings | |
from django.core.management.base import BaseCommand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from __future__ import absolute_import, print_function, unicode_literals | |
import enum | |
class State(enum.IntEnum): | |
Ready = 1 | |
Running = 2 | |
Success = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if &compatible | |
set nocompatible | |
endif | |
language message C | |
" Key mapping | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package http; | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper | |
import com.fasterxml.jackson.module.kotlin.readValue | |
import okhttp3.OkHttpClient | |
import okhttp3.Request | |
import reactor.core.publisher.Mono | |
class Client(val httpClient: OkHttpClient = OkHttpClient(), val mapper: ObjectMapper = jacksonObjectMapper()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute "apt-get update" | |
execute "download libjpeg-turbo.deb" do | |
command "wget http://sourceforge.net/projects/libjpeg-turbo/files/#{node[:libjpegturbo][:version]}/libjpeg-turbo-official_#{node[:libjpegturbo][:version]}_amd64.deb" | |
cwd "/tmp" | |
not_if "test -d /opt/libjpeg-turbo" | |
end | |
execute "install libjpeg-turbo" do | |
command "dpkg -i libjpeg-turbo-official_#{node[:libjpegturbo][:version]}_amd64.deb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
location ~ ^/assets/images/.+\.(?:gif|jpg|png)$ { | |
if ($http_accept ~* "webp") { | |
add_header Vary Accept; | |
rewrite (.+)\.(?:gif|jpg|png) $1.webp last; | |
} | |
if ($http_user_agent ~* "(Chrome|Opera|Android|Android.*Chrome)") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"path/filepath" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/service/s3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import time | |
from pip.utils.ui import DownloadProgressBar | |
LENGTH = 100 | |
bar = DownloadProgressBar(max=LENGTH) | |
bar.suffix = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
Description: VPC Network Template | |
Parameters: | |
ServiceName: | |
Type: String | |
Description: Service name use resource tag and name field etc. | |
Default: example | |
EnvName: | |
Type: String | |
Description: environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.gist.hirokazumiyaji; | |
import java.util.concurrent.TimeUnit; | |
import io.micrometer.core.instrument.Timer; | |
import io.micrometer.spring.web.MeterRegistry; | |
import okhttp3.Interceptor; | |
import okhttp3.Request; | |
import okhttp3.Response; |
NewerOlder