Skip to content

Instantly share code, notes, and snippets.

View modeverv's full-sized avatar

modeverv modeverv

  • student of the open university of japan
  • Himeji,Japan
View GitHub Profile
package main
import (
"fmt"
"time"
"math"
)
// Contants
const oPi = "おっぱい"
module AvatarHeader
require 'fileutils'
def get_loop(field, method)
Account.remote.limit(19).each do |account|
# Account.remote.find_each do |account|
send(method, field, account)
end
end
javascript:(function(){var a=document.createElement("script");a.src="https://j.mp/1bPoAXq";document.head.appendChild(a);setInterval(function(){$("a[style^='background']").parent().parent().css("display","none");},100);})();
@modeverv
modeverv / makepodcast.rb
Last active February 18, 2018 18:36 — forked from matchy256/makepodcast.rb
指定ディレクトリ内のmp3ファイルから必要最低限のPodcast用RSSを生成する
#!/usr/bin/env ruby
# frozen_string_literal:true
require 'time'
require 'nkf'
title = 'band-demo'
location = 'https://lovesaemi.daemon.asia/chiaki'
files = []
package main
import f "fmt"
func reseiver(ch chan int) {
for {
i := <-ch
f.Println(i)
}
}
@modeverv
modeverv / vscode_markdown_preview_enhanced_custom.css
Created March 10, 2018 16:38
vscode markdown preview enhanced custom css
/* Please visit the URL below for more information: */
/* https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
.markdown-preview.markdown-preview {
// modify your style here
// eg: background-color: blue;
h1 {
border-left: solid 10px lightblue;
border-bottom: solid 2px lightblue;
require 'base64'
if ARGV.size != 1
puts "usage: ruby base64decode.rb <file of base64>"
exit(1)
end
base64string = IO.read(ARGV[0])
puts Base64.decode64(base64string)
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
@modeverv
modeverv / file0.txt
Last active January 29, 2019 09:57
Let's Encryptのワイルドカード証明書の取得と自動更新について(MyDNS)(2018/08現在) ref: https://qiita.com/lovesaemi/items/ed4db2be5eebae69202d
# Ubuntu
sudo apt install certbot
# AmazonLinux2
sudo yum install certbot
@modeverv
modeverv / file0.txt
Last active December 12, 2018 16:34
まだTLSv1.3(OpenSSL 1.1.1-pre8)はお勧めできない。(2018/08/18現在) ref: https://qiita.com/lovesaemi/items/132abc77a8278291805e
sudo su
cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.1.0g.tar.gz
tar xzvf openssl-1.1.0g.tar.gz
cd openssl-1.1.0g
./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'
make
sudo make install