Skip to content

Instantly share code, notes, and snippets.

git status | grep deleted: | awk '{print $3}' | xargs git rm
# ただしカラースキーム付きの場合は保証しない.
# Description:
# DOCOMOの雑談APIを利用した雑談
#
# Author:
# FromAtom
getTimeDiffAsMinutes = (old_msec) ->
now = new Date()
old = new Date(old_msec)
diff_msec = now.getTime() - old.getTime()
@mayukojpn
mayukojpn / facebook-mass-delete-group-members.js
Last active November 8, 2018 05:11 — forked from michaelv/facebook-mass-delete-group-members.js
This javascript removes all users from a facebook group. It works with the new facebook layout. Paste this in the javascript console. Script tested in Firefox. Known issues: 1. when facebook responds slowly, the script might experience hickups.. 2. occasionially, the error 'this user is not a member of the group' pops up.. IMPORTANT: add your ow…
var deleteAllGroupMembers = (function () {
var deleteAllGroupMembers = {};
// the facebook ids of the users that will not be removed.
// IMPORTANT: add your own facebook id here so that the script will not remove yourself!
var excludedFbIds = ['1234','11223344']; // make sure each id is a string!
var usersToDeleteQueue = [];
var scriptEnabled = false;
var processing = false;
deleteAllGroupMembers.start = function() {
@mayukojpn
mayukojpn / wp_setup_nav_menu_item_hotfix.php
Last active February 26, 2016 17:08 — forked from torounit/wp_setup_nav_menu_item_hotfix.php
wp_setup_nav_menu_item の Hotfix
<?php
/*
Plugin Name: #35324 hotfix
Plugin URI: https://core.trac.wordpress.org/ticket/35324
Description: This will fix a bug of post type archives support in nav menus.
Author: Toro_Unit, extendwings, mayukojpn
Author URI: https://gist.github.com/mayukojpn/6ef62c39dcf48c17ed96
Version: 0.1
*/
add_filter('wp_setup_nav_menu_item', function( $menu_item ) {
@mayukojpn
mayukojpn / shortcake-ui-demo.php
Last active March 28, 2017 21:47
ShortCake UI Demo Plugin
<?php
/**
* Plugin Name: Shortcake UI Pullquote Demo
* Plugin URI:
* Description: Try Shortcake with pull-quite shortcode
* Version: 1.0.0
* Author: Mte90
* License: GPL2
*/
<?php
$video_url = 'https://www.youtube.com/watch?v=b7mixrO2lzA';
echo wp_oembed_get($video_url);