Skip to content

Instantly share code, notes, and snippets.

@kupietools
kupietools / Docker Desktop v 4.0.0 thru 4.22.1 direct download links
Last active May 6, 2026 05:34
List of Direct Download links for Docker Desktop from version 4.0.0 released 2021-08-31 thru 4.22.1 released 2023-08-24, as archived on archive.org
@jakebathman
jakebathman / user-agents.txt
Last active April 28, 2026 01:19
A list of major user agent strings for different browsers and devices
Chrome/Windows: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome/Windows: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome/Windows: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome/macOS: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome/Linux: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome/iPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1
Chrome/iPhone (request desktop): Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87 Version/11.1.1 Safari/605.1.15
Chrome/iPad: Mozilla/5.0 (iPad; CPU OS 14_3 like Mac OS X) AppleWebKit/605.1.1
@takenoco82
takenoco82 / mysql_error_1148.md
Created November 17, 2018 07:41
MySQLのCSVインポートで ERROR 1148 (42000) が発生した際の対処方法

CSVファイルのインポートで ERROR 1148 (42000) が発生した際の対処方法

結論

以下のエラーが発生したら、サーバー・クライアント両方の local_infile オプションを 1 に設定してやる

mysql> LOAD DATA LOCAL INFILE '/tmp/users.csv' INTO TABLE users FIELDS TERMINATED BY ',' ENCLOSED BY '"';
ERROR 1148 (42000): The used command is not allowed with this MySQL version

サーバー側の設定

@topleague
topleague / twitter-card-genesis.php
Created September 2, 2017 18:55
Code for Adding Twitter Cards
//Code for Adding Twitter Cards
add_action('wp_head', 'add_twitter_cards');
function add_twitter_cards() {
if(is_single()) {
$tc_url = get_permalink();
$tc_title = get_the_title();
$tc_description = get_the_excerpt();
$tc_image = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), full );
$tc_image_thumb = $tc_image[0];
$tc_author = str_replace('@', '', get_the_author_meta('twitter'));
@evnm
evnm / gist:d17336bf42e887c6e756
Created June 10, 2015 23:39
Script to convert milliseconds since epoch to a human-readable timestamp
#!/usr/bin/python
import datetime
import sys
print datetime.datetime.fromtimestamp(float(sys.argv[1])/1000).strftime('%Y-%m-%d %H:%M:%S.%f')
@studiopress
studiopress / credits-1.php
Last active April 26, 2023 15:09
Genesis footer.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize the credits
add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' );
function sp_footer_creds_text() {
echo '<div class="creds"><p>';
echo 'Copyright &copy; ';
echo date('Y');
echo ' &middot; <a href="http://mydomain.com">My Custom Link</a> &middot; Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>';
@mariomartinezsz
mariomartinezsz / buscapdf.py
Created January 5, 2013 20:20
Find links to pdf files in HTML with BeautifulSoup (Just one level)
import urllib2
from bs4 import BeautifulSoup
my_url = 'http://slav0nic.org.ua/static/books/python/'
html=urllib2.urlopen(my_url).read()
sopa = BeautifulSoup(html)
current_link = ''
for link in sopa.find_all('a'):
current_link = link.get('href')
if current_link.endswith('pdf'):
print('Tengo un pdf: ' + current_link)