This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'set' | |
lib = Set.new | |
ARGV.each do |dir| | |
Dir.glob("#{dir}/**/*.rb").each do |rb| | |
File.foreach(rb) do |line| | |
if line =~ /^\s*require\s+["'](.*?)["']\s*$/ | |
lib_str = $1 | |
break if lib_str[0, 8] == "bundler/" # Skip file using bundler. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex | |
index 14414adc4..1b6d0cced 100644 | |
--- a/lib/pleroma/user.ex | |
+++ b/lib/pleroma/user.ex | |
@@ -440,6 +440,7 @@ defp fix_follower_address(params), do: params | |
def remote_user_changeset(struct \\ %User{local: false}, params) do | |
bio_limit = Config.get([:instance, :user_bio_length], 5000) | |
name_limit = Config.get([:instance, :user_name_length], 100) | |
+ fields_limit = Config.get([:instance, :max_remote_account_fields], 0) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
SUDO_COMMAND=pkexec | |
#SUDO_COMMAND=gksu | |
#SUDO_COMMAND=kdesu | |
avilable_governors=($(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors)) | |
#avilable_governors=(powersave performance) | |
#avilable_governors=(powersave schedutil performance) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function build_repoliststr { | |
ruby -ryaml -e 'print YAML.load(ARGF).map {|i| i.join(":::") }.join("%%%")' $HOME/.config/reasonset/workrepos.yaml | |
} | |
export repoliststr="$(build_repoliststr)" | |
function splitrepos { | |
echo $repoliststr | sed 's:%%%:\n:g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# -*- mode: ruby; coding: utf-8 -*- | |
pwlength = ARGV.shift&.to_i || 64 | |
pwlength = 64 if pwlength < 1 | |
converter_symbols = ARGV.shift&.each_char | |
converter = converter_symbols ? ("a" .. "z").to_a + ("A" .. "Z").to_a + ("0" .. "9").to_a + converter_symbols : ('!' .. '~').to_a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from PyQt5.QtCore import * | |
from PyQt5.QtWidgets import QApplication | |
from PyQt5.QtWebEngineWidgets import * | |
app = QApplication(sys.argv) | |
web = QWebEngineView() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'yaml' | |
logic = {} | |
File.open(ARGV.shift) do |f| | |
logic = YAML.load f | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
setopt EXTENDED_GLOB | |
device="$(zenity --title="Select Device" --width=600 --height=500 --list --column="DEVICES" "${(f)$(xinput --list | ruby -e 'print ARGF.each.map {|i| i =~ /[^A-Za-z]*([A-za-z1-9 ]+[a-zA-Z0-9])\s*id=(\d+)/; "#$2 #$1\n" }.join.chomp')}"| perl -ne '/\d+/; print $&;')" | |
if (( $? == 0 )) && [[ -n $device ]] | |
then | |
action="$(zenity --list --column="ACTION" "turn on" "turn off")" | |
if (( $? == 0 )) && [[ -n $action ]] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
#### Default Settings #### | |
hts_voicefile=/usr/share/open-jtalk/voices/mei_normal.htsvoice | |
mecab_dictdir=/usr/share/open-jtalk/dic/ | |
jtalk_tuning=(-a 0.6 -r 0.8 -fm -2.0 -jf 1.5) | |
jtalk_tmpfile=$HOME/tmp/forcedtodo.wav | |
notify_interval=180 | |
notify_time=15000 | |
task_editor=mousepad |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
# Generate HTML files from Markdown files. | |
# It convert foo/bar.md to foo/bar.html | |
# This needs Pandoc. | |
STYLE_FILE="$HOME/local/repos/markdown-css/build/github/github.css" | |
BODY_CLASS="github" | |
PANDOC_OPTS=(-s --self-contained -t html5 -c $STYLE_FILE --toc) | |
for i in **/*.md |
NewerOlder