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 | |
G_GIT_REPO_DIR=${BGM_GIT_REPO:-~/source/bgm-archive} | |
G_GROUP_TOPIC_AVOID_LIST=() | |
G_PWD=`pwd` | |
G_RET="" | |
BGM_RAUKEN_TOPICLIST_URL_TEMPLATE="https://%s/rakuen/topiclist?type=group" | |
BGM_RAUKEN_TOPICLIST_URL= | |
BGM_GROUP_TOPIC_URL_TEMPLATE="https://%s/m/topic/group" |
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
var {spawn} = require("child_process") | |
var newHttpServer = spawn("httpserver") | |
function sleep(){ | |
return new Promise(resolve => setTimeout(resolve,5000)) | |
} | |
var ctr = 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/bash | |
# Kill Subprocesses Recursively | |
RECURSIVE_WARNING_THRESHOLD=20 | |
RECURSIVE_ERROR_THRESHOLD=50 | |
debug(){ | |
echo "DEBUG: $*" | |
} |
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 | |
OLDIFS="$IFS" | |
IFS=$'\n' | |
PATH='/c/Program Files/Transmission':$PATH | |
for i in $(ls \[U2\].*.torrent); do | |
torrent_name=$(transmission-show $i | grep -Po "(?<=^Name: ).+$") | |
echo "Torrent name: $torrent_name" | |
torrent_id=$(echo $i | grep -Po "(?<=\.)\d+(?=\.torrent)") | |
echo "Torrent ID: $torrent_id" | |
new_name="[U2].$torrent_name.$torrent_id.torrent" |
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
package moe.gyakkun.test; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.RandomAccessFile; | |
import java.nio.channels.FileChannel; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; |
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
import org.springframework.context.EnvironmentAware; | |
import org.springframework.core.env.Environment; | |
import org.springframework.stereotype.Component; | |
/** | |
* Read from application.properties by default priority. | |
**/ | |
@Component | |
public class ThirdUtils implements EnvironmentAware { |
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
var fs = require('fs'), | |
path = require('path'), | |
http = require('http'), | |
url = require('url'); | |
//Params | |
const imageDir = '/here/is/the/random/pictures/' | |
const imageURL = '/pic.jpg'; //The URL you want. | |
const servePort = 8080; //port | |
function getRandFile() { |
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
import java.util.*; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
class NthPrime { | |
private static NthPrime instance; | |
// ~ 1e11 |
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
sqlplus user/password@ip[:port]/service_name[as sysdba] | |
exp user/password@ip[:port]/service_name[as sysdba] FULL=YES BUFFER=64000000 FILE=./FULL.DMP | |
exp user/password@ip[:port]/service_name[as sysdba] OWNER=user BUFFER=64000000 FILE=./FULL.DMP | |
; FULL mode requires super administrator permission. | |
; plat/[email protected]:1522/orcl |
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
for /f %i in ('dir /b /ad "D:\Onedrive\OneDrive - AAAA"') do (mklink /d /j "D:\Onedrive\OneDrive - BBBB\%i" "D:\Onedrive\OneDrive - AAAA\%i") |