Skip to content

Instantly share code, notes, and snippets.

@hansode
hansode / pararell-curl.sh
Created September 9, 2011 07:25
pararell-curl.sh
#!/bin/bash
#
# $ pararell-curl.sh --url=[url]
# $ pararell-curl.sh --url=[url] --thread=6
#
LANG=C
LC_ALL=C
set -e
@koron
koron / jquery.gc-helper.js
Last active December 17, 2015 11:05
Remove jQuery related objects when remove elements by DOM API
// jQuery GC Helper - v0.9.5
//
// Copyright (C) 2014 MURAOKA Taro
// Licensed under the MIT license.
(function(global, jQuery) {
var observer;
function callback(mutations) {
@marcelog
marcelog / build_static_lame.sh
Created October 9, 2016 14:28
Build a static lame for MP3 encoding
#!/bin/bash
cd /usr/src
wget "http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Flame%2F&ts=1476009914&use_mirror=ufpr" -O lame-3.99.5.tar.gz
tar zxf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix=/usr/lame-3.99.5 --enable-static --disable-shared
make
make install
#!/bin/bash -x
## https://github.com/major/MySQLTuner-perl
wget http://mysqltuner.pl/ -O mysqltuner.pl
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
chmod +x mysqltuner.pl
@s-hiroshi
s-hiroshi / wp-eyecatch-images.md
Last active February 5, 2018 06:10
WordPress画像サイズをまとめたファイルです。

WordPressアイキャッチ画像メモ

サイズ設定

画像サイズ

画像サイズはthumbnail, medium, large, fullに加えアイキャッチが有効な場合はpost-thumbnailを指定できます。 (その他にも任意の幅、高さを配列で指定することも可)

  • 画像サイズ(ダッシュボード > 設定 > メディア)
@tknr
tknr / optimize_sqlite_db.sh
Created March 21, 2019 16:21
optimize sqlite db files
## http://d-goo.hatenablog.com/entry/2013/07/30/124148
for db in `find ~/ -name *.db`;do echo ${db};sqlite3 ${db} vacuum; sqlite3 ${db} reindex;done
@johnholdun
johnholdun / imgur-bookmarklet.js
Created April 9, 2011 22:43
Bookmarklet for uploading the image currently loaded in your browser to imgur
// that is, navigate to the direct URL for an image hosted on the world wide web, then >>>INVOKE<<<
// i wanted the bookmarklet to redirect to the new direct image URL but that was out of scope!
javascript:void(window.location="http://api.imgur.com/2/upload.json?url="+encodeURIComponent(window.location.href));
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'cgi'
require 'open-uri'
require 'rubygems'
require 'zipruby'
require 'rmagick'
SUPPORT_FORMAT = /\.(png|jpg)$/
@oquno
oquno / zip2mobi.rb
Created November 22, 2010 08:53
zip2mobi
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'cgi'
require 'open-uri'
require 'rubygems'
require 'zipruby'
require 'RMagick'
require 'kconv'
require 'logger'
require 'amazon/aws'
@jazzl0ver
jazzl0ver / fix_dropbox_centos.txt
Created October 16, 2018 14:37
Fuck you, Dropbox!
# Starting October 15, Dropbox has fucked all his CentOS 6 (and many other) users
# by changing OS requirements:
# ----
# We are reaching out to let you know that device(s) which do not meet our new
# operating system requirements have been logged out of the Dropbox desktop
# application. Dropbox has ended support for Ubuntu 13.10 and below, and Fedora 20
# and below.
# ...
# Your device(s) must now be on glibc 2.19 or higher to log back into the Dropbox
# desktop application