Skip to content

Instantly share code, notes, and snippets.

View kohki-shikata's full-sized avatar

Kohki SHIKATA kohki-shikata

  • Osaka, Japan
View GitHub Profile
javascript:(()%3D%3E%7B(A%3D%3E%7Bconst%20I%3Ddocument.createElement(%22script%22)%3BI.src%3D%22https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fpush.js%2F0.0.11%2Fpush.min.js%22%2CI.onload%3Dasync()%3D%3E%7Bawait%20A(Push)%7D%2Cdocument.body.appendChild(I)%7D)(((A%2CI)%3D%3E%7Bconst%20C%3D()%3D%3E%7Bconst%20I%3Ddocument.querySelectorAll(%22.status%22)%3Blet%20C%3D%5B%5D%3BI.forEach((A%3D%3E%7BC.push(A)%7D))%3Bconst%20g%3DC.filter((A%3D%3E%22%E5%AE%8C%E4%BA%86%EF%BC%81%22%3D%3D%3DA.textContent))%3Bif(I.length%3D%3D%3Dg.length%26%26I.length%3E0)%7BA.create(%22%E3%82%A2%E3%83%83%E3%83%97%E5%AE%8C%E4%BA%86%22%2C%7Bbody%3A%22%E3%81%82%E3%81%AA%E3%81%9F%E3%81%AE%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E3%81%8C%E5%85%A8%E3%81%A6%E5%AE%8C%E4%BA%86%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%EF%BC%81%22%2Cicon%3A%22https%3A%2F%2Fgigafile.nu%2Ffavicon.ico%22%2Ctimeout%3A1e4%2ConClick%3A()%3D%3Ethis.close()%7D)%3Bnew%20Audio(%22data%3Aaudio%2Fmp3%3Bbase64%2C%22%2B%22SUQzAwAAAAAxKVBSSVYAABCfAABYTVAAPD94cGFja2V0I
void((f => {
// Push.jsをCDNから読み込み
const script = document.createElement('script')
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/push.js/0.0.11/push.min.js'
script.onload = async () => {
await f(Push)
}
<!-- /packages/test_package/db.xml -->
<?xml version="1.0"?>
<schema version="0.3">
<table name="YoutubeAPIKey">
<field name="apikey" type="X2">
</field>
</table>
</schema>
@kohki-shikata
kohki-shikata / bash
Last active October 3, 2017 23:23
【随時更新】Hexo まとめ(Node.js製のブログ型静的サイトジェネレーター) ref: http://qiita.com/kohki-shikata/items/dc0cb4ccc97cb38b8023
$ hexo init <folder>
$ cd <folder>
$ npm install
@kohki-shikata
kohki-shikata / index.jade
Created April 4, 2016 06:08
Jade version of index.html for Foundation 6
doctype html
html.no-js(lang='en')
head
meta(charset='utf-8')
meta(http-equiv='x-ua-compatible', content='ie=edge')
meta(name='viewport', content='width=device-width, initial-scale=1.0')
title Foundation for Sites
link(rel='stylesheet', href='css/app.css')
body
.row
@kohki-shikata
kohki-shikata / package.json
Last active July 12, 2017 12:13
Foundation 6 with pug(ex:jade) or EJS
{
"name": "foundation-sites-template",
"version": "1.0.0",
"description": "Basic template for a new Foundation for Sites project.",
"main": "gulpfile.js",
"devDependencies": {
"browser-sync": "^2.11.1",
"ejs": "^2.4.1",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.0",
@kohki-shikata
kohki-shikata / gulpfile.js
Last active August 12, 2016 06:20
f6 with jade gulpfile.js
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var ejs = require('gulp-ejs');
var jade = require('gulp-jade');
var browserSync = require('browser-sync').create();
var plumber = require('gulp-plumber');
var dir = "../dist/";
var html_preprocessor = "jade";
@kohki-shikata
kohki-shikata / addCssInSpPageType.php
Last active January 3, 2016 13:09
**For concrete5Add custom css file in the specified page type.Required css file same named as page type handle, in the template directory.
<?php
$pageType = $c->getCollectionTypeHandle();//ページタイプのハンドルを取得
$pageTypeCss = $this->getThemePath() . "/css/" . $pageType . ".css";//そのハンドルの名前を使ったcssがあるとすると
$checkExists = file_exists($pageTypeCss);//そもそもそのcssファイルが存在するか
if(!$checkExists):?>
<link rel="stylesheet" href="<?php echo $pageTypeCss;?>">
<?php endif; // あるならlinkタグで出力。ないならそのまま ?>
@kohki-shikata
kohki-shikata / zusaar_count
Last active December 16, 2015 03:19
WordPress Shortcode counts attendance from a Zusaar event
function zusaar_count($atts){
extract(shortcode_atts(array(
'zid' => null
), $atts));
// return $zid;
define("ZUSAAR_API_EVENT_URI", "http://www.zusaar.com/api/event/?event_id="); //イベント自体のデータを取得。開催日時の取得用
define("ZUSAAR_API_USER_URI", "http://www.zusaar.com/api/event/user/?event_id="); //イベント出席者のデータを取得
$today = time(); // 現在の日付を確認
@kohki-shikata
kohki-shikata / to_top.js
Last active November 28, 2015 13:21
jQuery ToTop button
// this script depends on jQuery
$('#toTop').click(function(){
var speed = 400;
var href= $(this).attr("href");
var target = $(href == "#" || href == "" ? 'html' : href);
var position = target.offset().top;
$("html, body").animate({scrollTop:position}, speed, "swing");
return false;
});