Skip to content

Instantly share code, notes, and snippets.

Avatar
☂️

Reo uruly

☂️
View GitHub Profile
View stop-scroll.js
const defaultColor = 'rgb(255, 255, 0)';
const stopColor = 'rgb(37, 37, 37)';
/**
* Scroll
*/
window.onscroll = scrollWindow;
/**
* スクロールされている間呼ばれる
View TableViewController.swift
//
// TableViewController.swift
// MultipleCollectionView
//
// Created by Reo on 2019/11/08.
// Copyright © 2019 uruly.xyz. All rights reserved.
//
// I partially copied the following code.
// https://qiita.com/abouch/items/aca979b71ad792478687
@uruly
uruly / archive-external-link.php
Last active Jul 25, 2020
Make WordPress custom post title an external link
View archive-external-link.php
@uruly
uruly / RealmMigration.swift
Last active Jul 16, 2020
Realm マイグレーション処理用
View RealmMigration.swift
//
// RealmMigration.swift
//
// Created by Reo on 2020/07/16.
// Copyright © 2020 uruly.xyz. All rights reserved.
//
import UIKit
import RealmSwift
View CameraViewController.swift
//
// CameraViewController.swift
// CameraTest
//
// Created by Reona Kubo on 2019/07/08.
// Copyright © 2019 Reona Kubo. All rights reserved.
//
import UIKit
import AVFoundation
View additional-post-plugin.php
<?php
/*
Plugin Name: Additional Post Plugin
Description: 投稿ページに追記欄を作成する
Version: 1.0
Author: Reo
*/
define( 'ADDPP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
View class.news-posts-plugin.php
<?php
/**
*
* News_Posts_Plugin Common Settings .
*
*/
if ( !class_exists('News_Posts') ) {
exit;
}
View youtube-firebase-login.js
// Google API Login
function youtubeLogin() {
gapi.load('client:auth2', () => {
gapi.client.init({
apiKey: config.apiKey,
clientId: config.clientId,
discoveryDocs: config.discoveryDocs,
scope: config.scopes.join(' '),
}).then(() => {
gapi.client.load('youtube', 'v3', () => {
View fixed-header.js
window.onload = function() {
var header = document.querySelector('header');
var headerOffsetY = header.offsetTop;
window.onscroll = function() {
var offsetY = window.pageYOffset;
if (headerOffsetY > offsetY) {
//ここで固定解除( 元々のものに戻す )
header.style.position = 'absolute';
header.style.top = '';
header.style.bottom = '0';
@uruly
uruly / index.html
Created Jul 14, 2018
Stop Scroll - Pure JavaScript
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>