Skip to content

Instantly share code, notes, and snippets.

@bhwebworks
bhwebworks / Embed Gists with a URL
Last active October 14, 2023 14:38
Add to functions.php or a mu-plugin
/**
* Embed Gists with a URL
*
* Usage:
* Paste a gist link into a blog post or page and it will be embedded eg:
* https://gist.github.com/2926827
*
* If a gist has multiple files you can select one using a url in the following format:
* https://gist.github.com/2926827?file=embed-gist.php
*
@WeptunUser
WeptunUser / floatsign.sh
Last active January 1, 2022 21:23 — forked from mediabounds/floatsign.sh
Now fix when no entitlements are present.
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
# Extension Copyright (c) 2013 Weptun Gmbh
# http://www.weptun.de
#
# Extended by Ronan O Ciosoig January 2012
#
# Extended by Patrick Blitz, April 2013
@si1en2i0
si1en2i0 / extract_zip_in_correct_encoding.php
Created June 11, 2012 08:54
Linux/MacOS下解压中文乱码的zip包
<?php
/**
* 解压含有文件名为UTF-8编码的zip包,到当前目录
*
* Mac OS X 系统自带的压缩程序对 zip 文件名用 UTF-8 编码
* 但 zip 文件头中没有声明 PKZIP 高版本增加的 Unicode 位。
* Windows 会认为文件名是 ANSI 编码,结果显示乱码。
*
* @uses zipcorrect.php file.zip
@fernandoaleman
fernandoaleman / Linux Static IP
Created March 23, 2012 16:20
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@clyfish
clyfish / solarized-dark.xcs
Created December 21, 2011 07:06
xshell solarized dark color theme
[Solarized Dark]
text(bold)=839496
magenta(bold)=6c71c4
text=839496
white(bold)=fdf6e3
green=859900
red(bold)=cb4b16
green(bold)=586e75
black(bold)=073642
red=dc322f
@miya0001
miya0001 / select_media.html
Created May 15, 2011 13:18
WordPressプラグイン内でメディアアップローダーを使用してファイル名を選択しテキストフィールドに挿入する
<h3>My Picture (1)</h3>
<input type="text" id="my_media_1" name="my_media_1" value="" />
<a class="media-upload" href="JavaScript:void(0);" rel="my_media_1">Select File</a>
<h3>My Picture (2)</h3>
<input type="text" id="my_media_2" name="my_media_2" value="" />
<a class="media-upload" href="JavaScript:void(0);" rel="my_media_2">Select File</a>