Skip to content

Instantly share code, notes, and snippets.

@Treeki
Treeki / TurnipPrices.cpp
Last active November 1, 2024 14:15
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@torounit
torounit / functions.php
Created November 15, 2018 18:39
Gutenberg で選択出来るフォントサイズを変更。
<?php
add_action( 'after_setup_theme', function() {
add_theme_support('editor-font-sizes', [
[
'name' => 'Small',
'size' => 12,
'slug' => 'small'
],
[
@miya0001
miya0001 / wp-update.sh
Last active January 4, 2017 10:18
wp-cli
#!/usr/bin/env bash
set -eu
wp @all core verify-checksums
wp @all vackup create
wp @all core update
wp @all core language update
wp @all plugin update --all
@johnregan3
johnregan3 / wp-amp-tutorial-menu.php
Last active December 31, 2019 03:01
Creating a Menu using amp-sidebar in WordPress
<?php
/**
* Render the Primary Nav Menu
*
* Uses amp-sidebar to handle
* slideout animation.
*
* Be sure to include the amp-sidebar component script.
* Also, rememeber that the amp-sidebar element must be
* a direct child of the <body>.
@fumikito
fumikito / get_template_part.php
Created December 21, 2015 03:59
Alternative of WordPress' get_template_part which can accept arguments.
<?php
/**
* A template loader which accepts arguments.
*
* @param string $slug
* @param string|array $name
* @param array $args Arguments to pass.
* @param bool $echo If false, return string.
* @param string $glue Default is '-'. You can specify '/' which means directory separator.
*
@mitsuruog
mitsuruog / index.md
Last active October 25, 2024 05:35
express実践入門

express実践入門


自己紹介

小川充

  • mitsuruog
@megane9988
megane9988 / gist:330e3ebcebb48bdd9ea5
Last active June 19, 2018 05:44
amazonlinux + nginx + php + mysql + WordPress + Git

amazonlinux + nginx + php + mysql + WordPress + Git

ec2 インスタンス取得

  • t2.micro
  • Security Group は ssh と http を any で通るようにする
    • 可能ならssh は固定IPだけで通るようにする
  • 鍵は、すでにあればそれでも、新たに制作してもOK
@lsfalimis
lsfalimis / disable-OS-X-animation
Created May 4, 2014 01:32
disable OS X animation (10.9.2)
#Finder
#disable snap to grid animation
defaults write com.apple.finder AnimateSnapToGrid -bool false
#disable some animations
defaults write com.apple.finder DisableAllAnimations -bool true
#disable opening files zoom animation
defaults write com.apple.finder ZoomRects -bool false
@gaspanik
gaspanik / gulpjs.markdown
Last active January 2, 2016 18:19
gulpjsの始め方。
@marcelosomers
marcelosomers / git-php-webhook.php
Last active October 17, 2024 17:17
A basic webhook for deploying updates to repos on Github to your local server
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed