Skip to content

Instantly share code, notes, and snippets.

View torounit's full-sized avatar

Hiroshi Urabe torounit

View GitHub Profile
@fumikito
fumikito / login.php
Last active March 23, 2016 15:21
勝手にログイン
<?php
# ID1でログインする
include __DIR__.'/wp-load.php';
wp_set_auth_cookie(1);
header( 'Location: '.admin_url() );
exit;
@shimakyohsuke
shimakyohsuke / init.sh
Last active March 3, 2017 07:44
Wocker でコンテナ立ち上げ後に実効するやつ
#!/bin/bash
#shopt -s expand_aliases
#source ~/.bash_profile
## 日本語化する?
echo "日本語化する? [Y/N]"
read ANSWER
case $ANSWER in
"" | "Y" | "y" | "yes" | "Yes" | "YES" )
@JodiWarren
JodiWarren / acfpro-composer.json
Last active March 31, 2020 16:42
Advanced Custom Fields PRO for Composer
{
"repositories": [
{
"type": "package",
"package": {
"name": "advanced-custom-fields/advanced-custom-fields-pro",
"version": "5.0",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
module A2 where
------------------------------------------------------
-- 述語論理
-- まずは命題論理から
-- 真(⊤),偽(⊥)の定義が必要
-- ⊥ は証明がひとつもないような命題だから, 空集合によって表す
-- 帰納的定義によって次のように表現することができる
@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)
@tmknom
tmknom / fabfile.py
Last active September 27, 2020 00:28
CentOSをセキュアにセットアップするFabricスクリプト(暫定版:http://nekopunch.hatenablog.com/entry/2015/01/16/112402
# -*- encoding:utf-8 -*-
#
# CentOSをセキュアにセットアップするFabricスクリプト
#
# 前提条件 : Fabricインストール済/SSHの公開鍵作成済
# 実行方法 : fab deploy
# 検証環境 : CentOS6.6 (さくらのVPS 標準OSインストール)
#####################################################################
from fabric.api import env, run, sudo, put
@hissy
hissy / gist:0b8df0149fbba16be08d
Last active March 21, 2023 02:15
[Really Simple CSV Importer] 画像をインターネットからダウンロードして投稿に添付し、画像のIDをカスタムフィールドに登録
<?php
/*
Plugin Name: Really Simple CSV Importer Action add-on
Description: Run the additional action after importing the post data
Author: Takuro Hishikawa
Version: 0.1
*/
class rscsvimporter_action {
// singleton instance
@miya0001
miya0001 / gist:fdc361b5de4e56ad8109
Last active August 29, 2015 14:11
wp-tests-install
#!/usr/bin/env bash
set -ex;
echo 'DROP DATABASE IF EXISTS wordpress_test;' | mysql -u root
rm -fr /tmp/wordpress
rm -fr /tmp/wordpress-tests-lib
bash $(wp --info --format=json | jq -r '.wp_cli_dir_path')/templates/install-wp-tests.sh wordpress_test root '' localhost latest;
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@koba04
koba04 / api.md
Last active November 2, 2024 00:52
Vue.js note(v0.10.3). not translate. This is draft of https://github.com/koba04/vuejs-book .

API

Class: Vue

  • Vueはvue.jsのコアとなるコンストラクタ
  • インスタンスが作られたときにデータバインディングが開始される
  • オプションを取ることも出来て、DOMやデータやメソッドについて定義出来る