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 bomreader | |
import ( | |
"bufio" | |
"bytes" | |
"io" | |
"golang.org/x/text/encoding/unicode" | |
"golang.org/x/text/transform" | |
) |
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 ( | |
"crypto/md5" | |
"crypto/sha1" | |
"crypto/sha256" | |
"crypto/sha512" | |
"encoding/base64" | |
"encoding/hex" | |
"fmt" |
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
set surround | |
set hlsearch | |
set incsearch | |
set nowrapscan | |
set ignorecase | |
set smartcase | |
set keymodel=startsel,stopsel | |
nnoremap gr gT |
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.example.jooqext | |
import org.jooq.DSLContext | |
import org.jooq.Sequence | |
import org.jooq.impl.DSL | |
fun <T : Number> DSLContext.setval(sequence: Sequence<T>, value: T, isCalled: Boolean = true) = | |
select( | |
DSL.field( | |
"setval({0}, {1}, {2})", |
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
fun generateMysqlAesKey(key: String): ByteArray { | |
val myKey = ByteArray(16) | |
key.forEachIndexed { i, c -> | |
myKey[i % 16] = (myKey[i % 16].xor(key[i].toByte())) | |
} | |
return myKey | |
} |
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
# encoding: utf-8 | |
require 'digest/md5' | |
require 'digest/sha1' | |
require 'base64' | |
module Example | |
class LDAP | |
# LDAPパスワード生成クラス | |
class Password |
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
import java.security.SecureRandom | |
import java.util.Base64 | |
// Which is better? | |
val strong = SecureRandom.getInstanceStrong() | |
val sha1prng = SecureRandom.getInstance("SHA1PRNG") | |
println(strong.algorithm) | |
println(sha1prng.algorithm) | |
fun ByteArray.toHexString() = joinToString("") { "%02x".format(it) } |
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
#cloud-config | |
mounts: | |
- [ "/swapfile", "none", "swap", "defaults", "0", "0" ] | |
runcmd: | |
- [ "dd", "if=/dev/zero", "of=/swapfile", "bs=1G", "count=4" ] | |
- [ "chmod", "600", "/swapfile" ] | |
- [ "mkswap", "/swapfile" ] | |
- [ "swapon", "/swapfile" ] |
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
import java.time.* | |
import java.time.temporal.ChronoField | |
import java.time.temporal.TemporalAdjusters | |
import java.time.temporal.TemporalQuery | |
import java.time.temporal.UnsupportedTemporalTypeException | |
val year = Year.of(2018) | |
// 感謝祭 | |
// 11月の第4木曜日 |
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
version: "3" | |
services: | |
rocketchat: | |
container_name: rocketchat | |
image: rocket.chat:latest | |
restart: on-failure:3 | |
volumes: | |
- ./uploads:/app/uploads | |
depends_on: |
NewerOlder