Skip to content

Instantly share code, notes, and snippets.

View whizzalan's full-sized avatar
🎯
Focusing

george chao whizzalan

🎯
Focusing
View GitHub Profile
@whizzalan
whizzalan / owen_watch_file.sh
Created October 22, 2018 09:21
Watch File Example
watch_file=`stat -c %Y owen_watch_file.sh`;
now_=`date +%s`;
if [ $[ $now_-$watch_file ] -gt 1 ];then
echo 'Owen Good Job!';
else
echo 'This file Not be changed!';
fi
@whizzalan
whizzalan / owen_watch_file.sh
Created October 22, 2018 09:19
Watch File Example
watch_file=`stat -c %Y owen_watch_file.sh`;
now_=`date +%s`;
if [ $[ $now_-$watch_file ] -gt 1 ];then
echo 'Owen Good Job!';
else
echo 'This file Not be changed!';
fi
@whizzalan
whizzalan / linux_os_syntax
Last active January 18, 2018 08:28
新增硬碟空間
# linux 新增硬碟空間作法
```shell=
# 卸載先前 pure Storage
umount /data1
# 無法卸載,仍有user再上面使用,列出user 並將user執行程序殺除 <數字>c 表示正在執行
fuser -m /data1

Arch or Linux 常用指令

tags: Linux, arch

System

check linux

@whizzalan
whizzalan / installation.md
Created March 21, 2017 11:00
hortonworks_offline_installation

CentOS 6.8 / HDP 2.4.2.0

install httpd

yum install httpd service httpd start vim /etc/httpd/conf/httpd.conf

ServerName :80

cd /var/www/html

R Inhibit Interpretation/Conversion of Objects

tags: r

使用方法

class(x) #AsIs
@whizzalan
whizzalan / try-userAgent.R
Created November 9, 2016 12:30
taiwanSportLottery
usrAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"
getOption("HTTPUserAgent")
options(HTTPUserAgent=usrAgent)
url.regular <- "https://www.sportslottery.com.tw/web/services/rs/betting/tournamentGames/15102/0/t-4102.json?groups=278&groups=283&groups=289&groups=293&groups=683&locale=tw&brandId=defaultBrand&channelId=1"
httr_options("useragent")
curl_docs("useragent")
httr::set_config( config( ssl_verifypeer = 0L ) )
res = GET(url = url.regular,user_agent(usrAgent))

Latex Context Problem

context: command not found

sudo pacman -Rc poppler
sudo pacman -Sy poppler
sudo pacman -Sy extlive-core
library(httr)
library(rvest)
library(XML)
library(testit)
library(magrittr)
library(dplyr)
# origin="TPE"
# destination="SEA"