Skip to content

Instantly share code, notes, and snippets.

Youth.霖 YouthLin

Block or report user

Report or block YouthLin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@YouthLin
YouthLin / bing.sh
Created Sep 26, 2018
BingWallpaper-xfce4
View bing.sh
#!/bin/bash
#by youthlin.chen https://youthlin.com
dir=`pwd`
file=`curl -I "https://cn.bing.com/ImageResolution.aspx?w=1920&h=1080" 2>/dev/null | grep Location | awk '{print $2}'`
file=${file%_*}
file="${file}_1920x1080.jpg"
url="https://cn.bing.com$file"
file=${file##*/}
today=`date +%Y%m%d`
file="${today}_${file}"
View QiniuDownloader-Downloader
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Downloader {
private static final String urlListFile = "out.txt";
View PHP: image real path
<?php
echo "<h1>Hello, World</h1>" . PHP_EOL;
echo "<p>Welcome</p>" . PHP_EOL;
$img = "{$_SERVER["REQUEST_SCHEME"]}://{$_SERVER["HTTP_HOST"]}/uploads/qtalk.jpg";
$prefix = $_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["HTTP_HOST"] . "/";
echo "$prefix<br>" . PHP_EOL;
if(0 === strpos($img, $prefix)){
$img = substr($img, strlen($prefix));
$path = realpath($img);
@YouthLin
YouthLin / 1. UTF8 转 Unicode
Last active Sep 3, 2016
去哪儿网2017笔试
View 1. UTF8 转 Unicode
import java.util.Scanner;
/* UTF8 转 Unicode */
public class A {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String line;
while (in.hasNextLine()) {
line = in.nextLine();
View Filename
System.out.println("What's this");
You can’t perform that action at this time.