Skip to content

Instantly share code, notes, and snippets.

View DevelopKim's full-sized avatar

Develop.Kim DevelopKim

View GitHub Profile
<?php
function add_menu_icons_styles(){
?>
 
<style>
#adminmenu .menu-icon-events div.wp-menu-image:before {
content: '\f145';
}
</style>
function new_subcategory_hierarchy() {
$category = get_queried_object();
$parent_id = $category->category_parent;
$templates = array();
if ( $parent_id == 0 ) {
// Use default values from get_category_template()
$templates[] = "category-{$category->slug}.php";
chown -R www-data:www-data * # Let apache be owner
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r--
for i in `find . -name *.mp4`; do echo $i; j=`echo $i | sed -e 's/.mp4/.jpg/'`; echo $j; ffmpeg -y -i $i -f mjpeg -vframes 1 -ss 3 $j; done
@DevelopKim
DevelopKim / scroll-block-style.css
Created June 18, 2015 09:11
모달이 나타났을때 스크롤이 안되도록 하는 스타일
.sidemenu {
overflow: hidden;
position: fixed;
top: 0;
left: 0;
width: 100%;
}
$ curl -s -w "%{time_total}\n" -o /dev/null http://www.google.com/
0.095
$ for i in {1..3};do curl -s -w "%{time_total}\n" -o /dev/null http://www.google.com/; done
1.079
0.124
0.106
$ curl -w "@curl-format" -o /dev/null -s http://www.google.com/
time_namelookup: 0.416
time_connect: 0.435
time_appconnect: 0.000
// implicit cast
+true; // 1
+false; // 0
// bit shift by zero
true >>> 0; // 1, right zerofill
false >>> 0; // 0
true << 0; // 1, left
false << 0; // 0
// double bitwise NOT
~~true; // 1
osx$ boot2docker up
osx$ boot2docker ssh
docker@boot2docker$ sudo echo "nameserver 8.8.8.8" > /etc/resolv.conf
docker@boot2docker$ sudo /etc/init.d/docker restart
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)