Skip to content

Instantly share code, notes, and snippets.

View shukebeta's full-sized avatar
🎯
Focusing

David Wei shukebeta

🎯
Focusing
View GitHub Profile
@shukebeta
shukebeta / markdown_in_nginx.md
Created August 11, 2020 05:55 — forked from H2NCH2COOH/markdown_in_nginx.md
Markdown in Nginx

Markdown in Nginx

Nginx config

location ~ /.*\.md {
    root /www/;
    default_type text/html;
    charset UTF-8;
    add_before_body /strapdown/prepend;

add_after_body /strapdown/postpend;

@shukebeta
shukebeta / Model.tmpl.sql
Last active August 11, 2020 02:10 — forked from pdwetz/gist:5368441
Outputs a POCO for a given MySql table. Based on http://stackoverflow.com/a/13918084/21865 with mild formatting changes and additional types added.
select '%TABLE_NAME%'
into @table;
select '%DB_NAME%'
into @schema;
select concat(' public class ', @table)
union
select ' {'
union
select concat(' public ', tps.dest, ' ', column_name, ' { get; set; }')
@shukebeta
shukebeta / mysql_secure.sh
Last active June 9, 2020 05:14 — forked from coderua/mysql_secure.sh
This is a CentOS8 version for MySQL8
#!/bin/bash
#
# Automate mysql secure installation for Redhat/CentOS systems
#
# - You can set a password for root accounts.
# - You can remove root accounts that are accessible from outside the local host.
# - You can remove anonymous-user accounts.
# - You can remove the test database (which by default can be accessed by all users, even anonymous users),
# and privileges that permit anyone to access databases with names that start with test_.
@shukebeta
shukebeta / git.md
Last active March 20, 2024 08:57 — forked from suziewong/git.md
github的多人协作?how to 贡献代码?

github的多人协作

在 github 上,用别人的代码,直接 git clone 。可是如何把你的改进贡献出去回馈社会,就没那么多人会了。 这篇文章尝试解决这一问题。

Fork

从别人的项目中fork一个到你自己的仓库 这个时候这个仓库就是你的了,要删除这个仓库到设置-admin 那里,像你删除你自己创建的repo一样删除,(因为这个库就是你的了,你现在可以任意修改这个库,除非你pull request被接受否则你 不会对原作者的库产生任何影响)

@shukebeta
shukebeta / README.md
Created December 7, 2017 01:44 — forked from brandt/README.md
Creates a loopback alias with IP 127.0.0.2 at startup on Mac OS X

Loopback Alias

Creates an alias on the loopback interface (lo0) with the IP 127.0.0.2 on macOS.

Installation

  1. Install the plist to: /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  2. Set mode: sudo chmod 0644 /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  3. Set owner: sudo chown root:wheel /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  4. Load: sudo launchctl load /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist