Skip to content

Instantly share code, notes, and snippets.

Shingo Fukuyama ShingoFukuyama

  • Japan
Block or report user

Report or block ShingoFukuyama

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ShingoFukuyama
ShingoFukuyama / init.el
Created Sep 2, 2017
~/.spacemacs.d/init.el
View init.el
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@ShingoFukuyama
ShingoFukuyama / AppDelegate.swift
Created Aug 18, 2017
iOS project without storyboard. AppDelegate.swift
View AppDelegate.swift
/*
1. Delete `main.storyboard`
2. Emptify `Main Interface` on the project's general page
3. Add below code inside `application:didFinishLaunchingWithOptions`
*/
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
self.window = UIWindow(frame: UIScreen.main.bounds)
if let window = self.window {
@ShingoFukuyama
ShingoFukuyama / AddToHome
Last active Jul 25, 2017
A bookmarklet for Mobile Safari (iPhone/iPad). Make normal websites as standalone applications.
View AddToHome
javascript:;(function(d) {let html = d.querySelector('html');let head = d.querySelector('head');if (!head) {head = d.createElement('head');html.appendChild(head);}let meta1 = d.querySelector('meta[name=apple-mobile-web-app-capable]');if (meta1) {meta1.content = 'yes';} else {meta1 = d.createElement('meta');meta1.name = 'apple-mobile-web-app-capable';meta1.content = 'yes';head.appendChild(meta1);}let meta2 = d.querySelector('meta[name=apple-mobile-web-app-status-bar-style]');if (meta2) {meta2.content = 'black'; /* black-translucent, black, default */} else {meta2 = d.createElement('meta');meta2.name = 'apple-mobile-web-app-status-bar-style';meta2.content = 'black';head.appendChild(meta2);}})(document);
@ShingoFukuyama
ShingoFukuyama / 0_reuse_code.js
Created Jul 4, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ShingoFukuyama
ShingoFukuyama / strings.xml
Last active May 16, 2017
Android strings.xml for FontAwesome v4.7
View strings.xml
<resources>
<!--fontawesome v4.7 http://fontawesome.io/-->
<string name="fa_500px">&#xf26e;</string>
<string name="fa_address_book">&#xf2b9;</string>
<string name="fa_address_book_o">&#xf2ba;</string>
<string name="fa_address_card">&#xf2bb;</string>
<string name="fa_address_card_o">&#xf2bc;</string>
<string name="fa_adjust">&#xf042;</string>
<string name="fa_adn">&#xf170;</string>
@ShingoFukuyama
ShingoFukuyama / config.py
Last active Mar 7, 2017
Keyhac [~/Library/Application Support/Keyhac/config.py]
View config.py
import sys
import os
import datetime
import subprocess
from keyhac import *
def configure(keymap):
@ShingoFukuyama
ShingoFukuyama / MyButtonForInterfaceBuilder
Created Oct 20, 2016
Add border to UIButton on Xcode Interface Builder
View MyButtonForInterfaceBuilder
//
// MyButton.h
#import <UIKit/UIKit.h>
IB_DESIGNABLE
@interface MyButton : UIButton
@property (nonatomic, weak) IBInspectable UIColor *borderColor;
View UITextView+EmacsKeyboardShortcut.swift
//
// UITextView+Ext.swift
// BTKeyboardInputTest
//
// Created by Shingo Fukuyama on 10/10/16.
// Copyright © 2016 Shingo Fukuyama. All rights reserved.
//
import UIKit
View 0AutoPagerize.SITEINFO.user.js
// ==UserScript==
// @name 0AutoPagerize SITEINFO
// @namespace http://ss-o.net/
// @description oAutoPagerize SITEINFO
// @include http*
// @checkurl http://ss-o.net/userjs/0AutoPagerize.SITEINFO.user.js
// ==/UserScript==
(function(){
if (this.chrome) {
window.addEventListener('ChromeAutoPagerizeInitialize',function(evt){
View 0AutoPagerize.SITEINFO.js
// ==UserScript==
// @name 0AutoPagerize SITEINFO
// @namespace http://ss-o.net/
// @description oAutoPagerize SITEINFO
// @include http*
// @checkurl http://ss-o.net/userjs/0AutoPagerize.SITEINFO.js
// ==/UserScript==
(function(){
if (this.chrome) {
window.addEventListener('ChromeAutoPagerizeInitialize',function(evt){
You can’t perform that action at this time.