Skip to content

Instantly share code, notes, and snippets.

View lsongdev's full-sized avatar
๐Ÿ‘จโ€๐Ÿ’ป

Lsong lsongdev

๐Ÿ‘จโ€๐Ÿ’ป
View GitHub Profile
@jremus
jremus / README.md
Last active March 30, 2021 12:56
My aria2 configuration and init script for Raspbian.

Description

Installation

File Locations

  • aria2.conf as /etc/aria2.conf
  • aria2.sh as /etc/init.d/aria
@zachleat
zachleat / reading_time.rb
Last active March 20, 2025 09:04
Read this in X minutes Liquid Filter Plugin (for Jekyll)
# Outputs the reading time
# Read this in โ€œabout 4 minutesโ€
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180
@Yexiaoxing
Yexiaoxing / README.md
Last active June 26, 2018 03:49
Plugin for Jekyll to insert videos from Youku or Tudou.

่ฟ™ๆ˜ฏไธ€ไธช็”จไบŽJekyll็š„youkuใ€tudouๅตŒๅ…ฅๆ’ไปถใ€‚

This is a plugin meant for Jekyll.

็”จไพ‹๏ผš

Example use:

ๅฐ†youku.rbๅ’Œ/ๆˆ–tudou.rbๆ–‡ไปถๆ‹ท่ด่‡ณ_plugins็›ฎๅฝ•ไธ‹๏ผŒ็„ถๅŽๅœจๆ–‡็ซ ไธญ่พ“ๅ…ฅไปฅไธ‹ไปฃ็ ๅณๅฏๅตŒๅ…ฅใ€‚

@jedi4ever
jedi4ever / nodejs-cluster-zero-downtime.md
Last active July 26, 2024 14:01
nodejs clustering, zero downtime deployment solutions

Clustering: The basics

The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)

It does not balance, it leaves it to the kernel.

In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)

@fpfeng
fpfeng / v2ex_auto_login.py
Last active June 10, 2023 16:54
็™ปๅฝ• V2EX ้ข†ๅ–ๆฏๆ—ฅๅฅ–ๅŠฑ
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
username = '' ###่ดฆๅท###
password = '' ###ๅฏ†็ ###
login_url = 'http://v2ex.com/signin' ###ๅฆ‚V2EX่ฎพ็ฝฎไบ†ไฝฟ็”จ SSL,ๅฟ…้กปๆ”น https###
index_url = 'http://v2ex.com' ###ๅŒไธŠ###
mission_url = 'http://www.v2ex.com/mission/daily' ###ๅŒไธŠ###
UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \
@lsongdev
lsongdev / loudatui.rb
Last active March 23, 2016 09:05
Image downloader for loudatui.com
require 'net/http'
require 'nokogiri'
###
# Lsong
# [email protected]
# http://lsong.org
#
# MIT LICENSE
# http://lsong.mit-license.org/
#
@yckart
yckart / LICENSE.txt
Last active November 21, 2019 16:18 — forked from 140bytes/LICENSE.txt
Domster | Syntactic sugar for DOM-traversing
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2013 Yannick Albert <http://yckart.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@plentz
plentz / nginx.conf
Last active May 3, 2025 05:27
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@lsongdev
lsongdev / youjizz.rb
Last active December 24, 2015 05:29
Youjizz Downloader
# encoding: UTF-8
require 'net/http'
require 'nokogiri'
require 'colorize'
require 'fileutils'
require 'tempfile'
require 'uri'
require 'json'
@rxaviers
rxaviers / gist:7360908
Last active May 13, 2025 14:01
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue: