Skip to content

Instantly share code, notes, and snippets.

View pepoipod's full-sized avatar

Daiki Iwamoto pepoipod

View GitHub Profile
@pepoipod
pepoipod / remove-wp-auth0-user.php
Created October 30, 2018 06:41
wp-auth0で、auth0のユーザーを削除するコード
<?php
global $wpdb;
$current_user = wp_get_current_user();
$user_id = $current_user -> ID;
$auth0_id = get_user_meta($user_id, $wpdb -> prefix . 'auth0_id', true);
$serialized_profile = get_user_meta($user_id, $wpdb -> prefix . 'auth0_obj', true);
@pepoipod
pepoipod / Date.extensions.js
Created September 16, 2018 09:52
日本の曜日を取得するDateのprototype拡張
Date.prototype.getJpDay = function() { return ["日", "月", "火", "水", "木", "金", "土"][this.getDay()]; }
@pepoipod
pepoipod / Console.cs
Last active September 5, 2018 05:05
ソースコードを上から流れるように表示するUnityのComponent
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UniRx;
using UnityEngine;
using UnityEngine.UI;
[RequireComponent (typeof(Text))]
public class Console : MonoBehaviour {
@pepoipod
pepoipod / default.conf
Created June 21, 2018 02:18
react-router /etc/nginx/conf.d/default.conf
server {
listen 80 default_server;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
# access_log logs/static.log; # I don't usually include a static log
@pepoipod
pepoipod / SetIncidenceSample.cs
Created January 20, 2017 12:50
Unityエディタ上で出現率、発生率を設定出来るプログラム
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class SetIncidenceSample : MonoBehaviour {
[SerializeField]
int monster1Incidence;
@pepoipod
pepoipod / equalizeAllElementsHight.js
Last active August 29, 2015 14:24
固有のクラス名を持つ複数の要素に対して高さを揃えるスクリプト
function equalizeAllElementsHight (elements) {
var allElementsHeights = [];
elements.forEach(function (e) {
allElementsHeights.push(e.offsetHeight);
});
var maxHeight = Math.max.apply(null, allElementsHeights);
elements.forEach(function (e) {