Skip to content

Instantly share code, notes, and snippets.

View sundevilyang's full-sized avatar
😃

Yang Wen sundevilyang

😃
  • ByteDance
  • Beijing
View GitHub Profile
@sundevilyang
sundevilyang / config.md
Last active July 29, 2024 11:40
zed editor config

// Zed settings // // For information on how to configure Zed, see the Zed // documentation: https://zed.dev/docs/configuring-zed // // To see all of Zed's default settings without changing your // custom settings, run the open default settings command // from the command palette or from Zed application menu. { // "theme": "Tokyo Night Storm",

@sundevilyang
sundevilyang / feat-user-story
Last active July 17, 2024 01:05
Phoenix TDD Prompts
<system>
You are an expert in agile software development and user story creation, with a deep understanding of Phoenix LiveView applications. Your role is to help translate high-level feature ideas into well-structured user stories that can guide test-driven development.
When presented with a feature idea, you will:
1. Ask clarifying questions to understand the feature's purpose and scope.
2. Request information about relevant existing files in the Phoenix application.
3. Synthesize the information into a clear, concise user story.
Your output will be structured as follows:
@sundevilyang
sundevilyang / custom.css
Last active January 19, 2024 07:05
logseq
/* Theme custom css start
Dracula Theme for Logseq
Source: https://raw.githack.com/dracula/logseq/master/custom.css
*/
/* Importing fonts from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Fira+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");
/* Root variable definitions for theme colors and font settings */
:root {
@sundevilyang
sundevilyang / vscode-extensions
Created December 31, 2022 05:06
vscode extensions
code --install-extension amodio.tsl-problem-matcher
code --install-extension animus-coop.vscode-elixir-mix-formatter
code --install-extension Arsen.darcula-theme-for-elixir
code --install-extension bajdzis.vscode-database
code --install-extension benvp.vscode-hex-pm-intellisense
code --install-extension bierner.markdown-mermaid
code --install-extension bpruitt-goddard.mermaid-markdown-syntax-highlighting
code --install-extension bradlc.vscode-tailwindcss
code --install-extension christian-kohler.path-intellisense
code --install-extension Compulim.indent4to2
@sundevilyang
sundevilyang / pair.rb
Created September 3, 2019 13:51 — forked from cantin/pair.rb
GuangZhou RailsGirs Pair
tutors = ["***", "***", "***"]
girls = ["***", "***", "***"]
number = "To be defined"
tutors = tutors.shuffle(random: Random.new(number))
girls = girls.shuffle(random: Random.new(number))
result = Hash.new { |hash, key| hash[key] = [] }
tutors.cycle(3).each_with_index do |tutor, i|
result[tutor] << (girls[i] || "未配对")
@sundevilyang
sundevilyang / capybara cheat sheet
Created June 4, 2019 05:28 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@sundevilyang
sundevilyang / Gemfile
Last active June 4, 2019 04:51
configure rspec and capybara with ruby on rails
group :development, :test do
gem 'rspec-rails'
gem 'capybara'
gem 'factory_bot_rails'
gem 'ffaker'
end
group :test do
gem 'cucumber-rails', require: false
gem 'database_cleaner'
@sundevilyang
sundevilyang / gist:e91a3d82c91cdbc467a96df37c3bbac1
Last active June 2, 2019 01:21
Setting Up RSpec \Capybara\Factory_bot In Rails 5
[Setting Up RSpec And Capybara In Rails 5 For Testing | Tandem](https://madeintandem.com/blog/setting-up-rspec-and-capybara-in-rails-5-for-testing/)
RSpec是Ruby社区中一个非常受欢迎的行为驱动开发(BDD)测试框架。
Capybara使我们的用户最终可以轻松地与应用程序进行交互:通过浏览器。它有一个可读的DSL和各种配置选项(我们稍后会介绍)。
## 获得工具
显然你会想要安装RSpec和Capybara,但是你也需要Selenium和Database Cleaner来帮助把它们放在一起。
将它们添加到:test和:development您的组中Gemfile,然后bundle install:
#!/usr/bin/python3
import logging
import re
from functools import wraps
import requests
from wxpy import *
logging.basicConfig(level=logging.INFO)