Skip to content

Instantly share code, notes, and snippets.

View butchi's full-sized avatar

IWABUCHI Yu(u)ki (butchi) butchi

View GitHub Profile

title: "Create a Blog with Nuxt Content 和訳" description: 'The Content module is a git files based headless CMS that provides powerful features when it comes to write blogs, documentation sites or just adding content to any regular website. In this post we will go through most of the benefits of this module and discover how we can create a blog with it.' imgUrl: blog/creating-blog-with-nuxt-content/main.png date: 2020-07-02 authors:

@shuuuuun
shuuuuun / formatNumber.js
Last active February 11, 2016 03:39
小数をdecimalLengthで切り捨てor四捨五入して、数値をカンマ区切りにするformatNumber関数
function formatNumber(number, decimalLength) {
// 小数をdecimalLengthで切り捨てて、数値をカンマ区切りにする
decimalLength = decimalLength || 0;
var str = number.toString().split(".");
var base = str[0].replace(/(?!^)(?=(\d{3})+$)/g,",");
var decimal = (str[1]) ? str[1].slice(0, decimalLength) : Array(decimalLength + 1).join("0");
var result = (!decimalLength) ? base : base + "." + decimal;
return result;
}
@ginrou
ginrou / construct_lenna.py
Last active August 14, 2023 09:27
DCTでlennaを再構成する
#!/bin/env python
import numpy as np
import scipy.misc
from scipy.fftpack import dct, idct
import sys
H = 128
W = 128
lenna = scipy.misc.imresize(scipy.misc.lena(), (H, W)).astype(float)
@mikevalstar
mikevalstar / GetRFC822Date.js
Created April 17, 2012 17:58
RSS 2.0 Jade Template
function GetRFC822Date(oDate){
// allow for empty request
if(typeof(oDate) == "undefined" || !oDate) oDate = new Date();
//Pads numbers with a preceding 0 if the number is less than 10.
var LZ = function(val){ return (parseInt(val) < 10) ? "0" + val : val; }
/* accepts the client's time zone offset from GMT in minutes as a parameter. returns the timezone offset in the format [+|-}DDDD */
var getTZOString = function(timezoneOffset){