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 | |
| # launches a session dbus instance | |
| dbuslaunch="`which dbus-launch 2>/dev/null`" | |
| if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then | |
| eval `$dbuslaunch --sh-syntax --exit-with-session` | |
| fi |
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
| export XMODIFIERS="@im=SCIM" | |
| export XIM=SCIM | |
| #Set scim-bridge | |
| export XIM_PROGRAM="/usr/bin/scim-bridge" | |
| export XIM_ARGS="-n" | |
| export GTK_IM_MODULE=scim-bridge | |
| export QT4_IM_MODULE=scim-bridge | |
| scim -d & |
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
| <?php | |
| $mysql = new SaeMysql(); | |
| $sql = "SELECT `uid` FROM `users`"; | |
| $users = $mysql->getData($sql); | |
| foreach($users as $userline) { | |
| $uid = $userline['uid']; | |
| $sql = "SELECT * FROM `phones` WHERE `uid` = $uid"; | |
| $phones = $mysql->getData($sql); | |
| $sql = "SELECT * FROM `stocks` WHERE `uid` = $uid"; |
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
| nodemailer = require "nodemailer" | |
| smtpTransport = nodemailer.createTransport "SMTP", | |
| service: "Gmail" | |
| auth: | |
| user: | |
| pass: | |
| mail = | |
| from: "" |
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/sh | |
| cd `dirname $0` | |
| F=`pwd |sed -e "s#$HOME/\?##"` | |
| for P in * | |
| do | |
| # skip setup | |
| if [ "$P" = "setup.sh" ]; then continue; fi |
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
| # |kw| as keyword | |
| sites = | |
| neubt: "//neubt.com/search.php?mod=forum&searchid=23034&orderby=lastpost&ascdesc=desc&searchsubmit=yes&kw=|kw|" | |
| byrbt: "//bt.byr.cn/torrents.php?incldead=0&spstate=0&inclbookmarked=0&search=|kw|&search_area=0&search_mode=0" | |
| ptbt: "//pt.sjtu.edu.cn/torrents.php?incldead=0&spstate=0&inclbookmarked=0&picktype=0&search=|kw|&search_area=0&search_mode=0" | |
| search = (keyword) -> | |
| window.open v.replace '|kw|', keyword for _, v of sites | |
| return |
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
| # | |
| # - install jdk8 from oracle | |
| # | |
| add-apt-repository -y ppa:webupd8team/java | |
| apt-get update | |
| echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections | |
| apt-get install -y oracle-java8-installer | |
| apt-get install oracle-java8-set-default |
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
| require 'test/unit' | |
| require './tiny_frp.rb' | |
| module TinyFRP | |
| module UnitTest | |
| module Util | |
| def lift(&proc) | |
| TinyFRP::Lift.new(&proc) | |
| 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
| sudo apt-get update -qq | |
| sudo apt-get install -qq software-properties-common | |
| sudo apt-add-repository -y ppa:brightbox/ruby-ng | |
| sudo apt-get update -qq | |
| sudo apt-get install -qq build-essential ruby2.6{,-dev} zlib1g-dev libsqlite3-dev | |
| gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ | |
| # cat >> ~/.gemrc <<EOF |
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 'net/smtp' | |
| email = '' | |
| passwd = '' | |
| subject = $*[0] || "Ring Ring" | |
| text = $*[1] || "An alarm has been triggered." | |
| message = <<MESSAGE_END | |
| From: Ringer <#{email}> |
OlderNewer