Skip to content

Instantly share code, notes, and snippets.

View maboloshi's full-sized avatar

沙漠之子 maboloshi

  • 03:25 (UTC +08:00)
View GitHub Profile
@foru17
foru17 / markdownvideo.html
Created June 7, 2014 06:17
在Markdown中添加视频方法
<video id="video" controls="" preload="none" poster="http://media.w3.org/2010/05/sintel/poster.png">
<source id="mp4" src="http://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4">
<source id="webm" src="http://media.w3.org/2010/05/sintel/trailer.webm" type="video/webm">
<source id="ogv" src="http://media.w3.org/2010/05/sintel/trailer.ogv" type="video/ogg">
<p>Your user agent does not support the HTML5 Video element.</p>
</video>
@JingwenTian
JingwenTian / curl-example.md
Created October 21, 2014 16:21
linux curl 命令详解,以及常用curl实例 ( http://blog.51yip.com/linux/1049.html
  1. 抓取页面内容到一个文件中

curl -o home.html http://jingwentian.com

2.用-O(大写的),后面的url要具体到某个文件,不然抓不下来。我们还可以用正则来抓取东西

curl -O http://jingwentian.com/logo.png 
curl -O http://jingwentian.com/uploads/2010/[0-9][0-9]/demo.jpg  
@m2lan
m2lan / readme.md
Last active February 22, 2020 02:56
git版本回退、撤销修改、删除文件、远程仓库、分支管理策略

版本回退

  • 如果信息显示过多的话,可以使用git log --pretty=oneline

      dfffd94bebdc57c208b5a5c4594b4434bc789226 update a.txt
      9bdf0e56568f64ae6c666cd22f32ed1ca0951383 update a.txt
      2a474cb5f533fbf3bc5fd0b2fe3c856a37a9dd1e add a.txt
    
  • 如果想回退到上个版本,可以使用git reset --hard HEAD^,如果想回退前2个版本git reset --hard HEAD^^,多个版本添加多个^。如果回退前100个版本,可以使用git reset --hard HEAD~100

@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active November 17, 2023 06:53
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@taichunmin
taichunmin / windows_appkey.md
Last active February 10, 2025 06:36
Windows AppKey

如何修改 Windows 鍵盤對應

現在的 Keyboard 通常會附多媒體鍵,不過預設值打開可能就是討人厭音質又差的 Windows Media Player。 如果我們希望這些鍵可以按下去是開啟我們想要的軟體,此時通常要裝 Driver,問題是有時候會找不到 Driver,那也沒關係,直接改機碼就可以囉,以下是說明:

  1. 先執行 regedit
    • 機碼位於 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\
  2. 在其下加入數字機碼,代表對應的 AppKey 按鍵 (詳見對應表)
    • 例:16 就是 Media 切換功能
    • 要換掉的話可以先將原來的值備份
@maxim
maxim / gh-dl-release
Last active March 7, 2025 08:36
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@HawkingOuYang
HawkingOuYang / 5. How to use .gitignore for Xcode
Last active September 6, 2021 06:17
.gitignore 语法 与 Xcode
################################################
# Added by OYXJ on 2016-01-01
#
# Configure git to track only one file extension
# http://stackoverflow.com/questions/12799855/configure-git-to-track-only-one-file-extension
#
# Using .gitignore to ignore everything but specific directories
# http://stackoverflow.com/questions/5241644/using-gitignore-to-ignore-everything-but-specific-directories
#
# Git ignore file for Xcode projects (重要)
@subfuzion
subfuzion / curl.md
Last active March 31, 2025 16:15
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@vyder
vyder / iterm
Last active February 6, 2025 17:43
iterm.bash - Launch iTerm from command line
#!/bin/bash
#
# Open new iTerm window from the command line
#
# Usage:
# iterm Opens the current directory in a new iTerm window
# iterm [PATH] Open PATH in a new iTerm window
# iterm [CMD] Open a new iTerm window and execute CMD
# iterm [PATH] [CMD] ... You can prob'ly guess
#