Skip to content

Instantly share code, notes, and snippets.

View peter279k's full-sized avatar
🎯
Focusing

Chun-Sheng, Li peter279k

🎯
Focusing
View GitHub Profile
@peter279k
peter279k / install-xrdp-ubuntu-18.04.md
Created July 3, 2021 16:05 — forked from hehuan2112/install-xrdp-ubuntu-18.04.md
Install Remote Desktop (xRDP) for Ubuntu Server 18.04

Install Remote Desktop (xRDP) for Ubuntu Server 18.04

Step 1 – Install xRDP:

sudo apt update
sudo apt install xrdp

Step 2 – Install XFCE4

sudo apt install xfce4

@peter279k
peter279k / download.php
Created April 9, 2021 17:43 — forked from beyerz/download.php
Symfony console, download remote file with progress bar using guzzle
/**
* @param SymfonyStyle $io
* @param $remotePath
*
* @return string
*/
public function download(SymfonyStyle $io, $remotePath)
{
$io->section("Download " . $remotePath);
$parts = parse_url($remotePath);
@peter279k
peter279k / facebook_login.py
Last active October 23, 2023 07:36 — forked from UndergroundLabs/gist:fad38205068ffb904685
Facebook Python Login Script
#!/home/drspock/scripts/FBInvite/bin/python
import argparse
import requests
import pyquery
def login(session, email, password):
'''
Attempt to login to Facebook. Returns user ID, xs token and
@peter279k
peter279k / pkl_to_json.py
Created February 24, 2020 08:39 — forked from hailiang-wang/pkl_to_json.py
Convert python pickle file to json
#!/usr/local/bin/python3
'''
Convert a pkl file into json file
'''
import sys
import os
import _pickle as pickle
import json
/* MODELS */
var ProjectCollection = function(projects){
var self = this;
var projects = projects;
this.create = function(attrs){
projects.push(attrs)
// might want to a bit of ajax here
@peter279k
peter279k / drive-format-ubuntu.md
Created January 7, 2020 18:01 — forked from keithmorris/drive-format-ubuntu.md
Partition, format, and mount a drive on Ubuntu
@peter279k
peter279k / Dockerfile
Created January 3, 2020 05:54 — forked from sidja/Dockerfile
How to change time zone in docker container ubuntu
FROM ubuntu:16.04
ENV TZ=Australia/Melbourne
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN dpkg-reconfigure --frontend noninteractive tzdata
@peter279k
peter279k / .profile
Created April 8, 2019 06:25 — forked from edwinksl/.profile
Default .profile for Ubuntu 16.04 copied from /etc/skel/.profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

我的 Vim 指令筆記

vim 的三種模式

模式

  • 輸入模式:輸入內文。
  • 指揮模式:也叫指令模式,主要是進入到可以對文件做修改,複製,剪下貼上,游標移動等動作。
  • 執行模式:文件存檔,離開等等行為。

常用模式的切換

  • 輸入模式 -> 指揮模式 : 鍵盤 Esc

#我的 Vim 指令筆記

##vim 的三種模式 ###模式

  • 輸入模式:輸入內文。
  • 指揮模式:也叫指令模式,主要是進入到可以對文件做修改,複製,剪下貼上,游標移動等動作。
  • 執行模式:文件存檔,離開等等行為。

###常用模式的切換

  • 輸入模式 -> 指揮模式 : 鍵盤 Esc