Skip to content

Instantly share code, notes, and snippets.

# Centos 7.1
yum -y install wget
wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
rpm -ivh nux-dextop-release-0-5.el7.nux.noarch.rpm
yum -y install deluge-web
systemctl start deluge-web
systemctl stop firewalld
@alimbada
alimbada / Export-Chocolatey.ps1
Last active April 21, 2024 11:39
Export installed Chocolatey packages as packages.config - thanks to Matty666
#Put this in Export-Chocolatey.ps1 file and run it:
#.\Export-Chocolatey.ps1 > packages.config
#You can install the packages using
#choco install packages.config -y
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>"
Write-Output "<packages>"
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" }
Write-Output "</packages>"
@t2psyto
t2psyto / translate_srt.py
Created June 3, 2015 15:35
.srt ファイルを日本語翻訳するツール。注意:節度をもって使うこと。google translate にChrome(selenium webdriver)の自動操作でアクセスします。
# -*- coding:utf-8 -*-
from selenium import webdriver
user_agent = (
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) " +
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36"
)
sourcedir = "/tmp"
sourcefiles = ["subfile1.srt", "subfile2.srt"]
@jaydenseric
jaydenseric / ffmpeg-web-video-guide.md
Last active February 17, 2024 23:49
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg

Install

On mac:

  1. Download the latest release.
  2. Extract the binary and place it in /usr/local/bin.

Command basics

@drparham
drparham / www.conf
Last active December 16, 2021 15:39
PHP FPM config t2.small
# t2.small
pm = dynamic
pm.max_children = 35
pm.start_servers = 6
pm.min_spare_servers = 4
pm.max_spare_servers = 8
pm.max_requests = 300
# t2.medium
@frengky
frengky / rtorrent.rc
Created December 30, 2015 02:55
Setup systemd with the rtorrent service
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# Maximum and minimum number of peers to connect to per torrent.
min_peers = 1
max_peers = 300
# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 1
@ymmt2005
ymmt2005 / bittorrent.md
Created February 3, 2016 08:00
BitTorrent 調査

BitTorrent 調査まとめ

概要

BitTorrentの仕組みを読むのが早い。

完全な P2P というわけではなく、コンテンツとピアの情報を管理するトラッカーというサーバーがいる。トラッカー不在でも動作するDHTモードという仕組みもある。

@s-hiroshi
s-hiroshi / wp-eyecatch-images.md
Last active February 5, 2018 06:10
WordPress画像サイズをまとめたファイルです。

WordPressアイキャッチ画像メモ

サイズ設定

画像サイズ

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

  • 画像サイズ(ダッシュボード > 設定 > メディア)
@stoikheia
stoikheia / cue_to_mp3.py
Last active January 30, 2021 17:24 — forked from bancek/cue_to_mp3.py
CUE splitter using ffmpeg (to mp3)
# -*- encoding: utf-8 -*-
import sys
import os.path
import codecs
if len(sys.argv) == 1:
print "Usage: cue_to_mp3.py <CUE file path> [-o]"
print "Options:"
print " -o, execute and output mp3 file"
#!/bin/bash
echo "Input ISO Name Without .ISO (also doesnt support spaces in filename)":
read isofolder
isoname=$isofolder.ISO
echo Gonig to be converting $isoname
sleep 2
mkdir /mnt/data/ConvertedVideos/$isofolder
rawout=$(HandBrakeCLI -i ./$isoname -t 0 2>&1 >/dev/null)
#read handbrake's stderr into variable