Skip to content

Instantly share code, notes, and snippets.

View zhulinpinyu's full-sized avatar
🎯
Focusing

Lixiang Mu zhulinpinyu

🎯
Focusing
View GitHub Profile
@zhulinpinyu
zhulinpinyu / web-servers.md
Created November 18, 2021 02:59 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@zhulinpinyu
zhulinpinyu / struct_extension.ex
Created October 17, 2019 06:18 — forked from zampino/struct_extension.ex
Elixir Extending a Struct
defmodule DSL do
defmacro extend_struct struct_mod, keyword do
quote do
defstruct Keyword.merge(Map.to_list(Map.from_struct(unquote(struct_mod).__struct__)), unquote(keyword))
end
end
end
name: Elixir CI
on: push
jobs:
build:
runs-on: ubuntu-latest
container:
@zhulinpinyu
zhulinpinyu / OpenLayers 3 Google Maps API.md
Last active January 23, 2016 01:49 — forked from elemoine/README.md
OpenLayers 3 Google Maps API

Use OL3 and Google Maps together

This GIST provides an example of a Google Maps map with an OL3 map as control, to give users a Google base map with OL3 content on top.

Open the corresponding bl.ock to view the example in your browser.

Warning!

@zhulinpinyu
zhulinpinyu / 01_step.sh
Last active August 29, 2015 14:23 — forked from Mikke/01_step.sh
rails g scaffold Book title:string description:text
rails g scaffold Pubhouse title:string address:text
rails g model BookPubhouse book_id:integer pubhouse_id:integer
rake db:migrate