Skip to content

Instantly share code, notes, and snippets.

View megrxu's full-sized avatar
🥝
Learning

megrxu

🥝
Learning
View GitHub Profile
@megrxu
megrxu / site.conf
Created July 26, 2017 00:50 — forked from XiangpengHao/site.conf
A simple Nginx config template
server{
listen 80;
server_name file.zjuqsc.com;
return 301 https://$host$request_uri;
}
server {
listen 12081;
listen 443 ssl http2;
server_name file.zjuqsc.com;
ssl_certificate /srv/ssl/file.zjuqsc.com.crt;
@megrxu
megrxu / greeting.sh
Last active April 29, 2022 08:14
Message of one day.
#!/bin/bash
#define the filename to use as output
motd="/tmp/motd"
# Collect useful information about your system
# $USER is automatically defined
HOSTNAME=`uname -n`
KERNEL=`uname -r`
CPU=`cat /proc/cpuinfo | grep 'model name' | uniq | cut -f2 -d":"`
ARCH=`uname -m`
# The different colours as variables

Keybase proof

I hereby claim:

  • I am megrxu on github.
  • I am xugr (https://keybase.io/xugr) on keybase.
  • I have a public key ASA2varSE_NbeEIqds2KomH1yuIOFpt9cvDR_8EtjcfApQo

To claim this, I am signing this object: