1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Update docs

This commit is contained in:
Cotes Chung
2021-09-16 00:26:35 +08:00
parent beabb36d7f
commit f722757f6f
4 changed files with 41 additions and 46 deletions

View File

@@ -176,44 +176,23 @@ SHELL=/usr/local/bin/bash
PYENV_SHELL=bash
```
#### Ruby
```ruby
def sum_eq_n?(arr, n)
return true if arr.empty? && n == 0
arr.product(arr).reject { |a,b| a == b }.any? { |a,b| a + b == n }
end
```
#### Shell
```shell
```bash
if [ $? -ne 0 ]; then
echo "The command was not successful.";
#do the needful / exit
fi;
```
#### Liquid
### Specific filename
{% raw %}
```liquid
{% if product.title contains 'Pack' %}
This product's title contains the word Pack.
{% endif %}
```
{% endraw %}
#### Java
```java
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
// Write out any hidden serialization magic
s.defaultWriteObject();
for (E e: map.keySet()) s.writeObject(e);
}
```sass
@import
"colors/light-typography",
"colors/dark-typography"
```
{: file='_sass/jekyll-theme-chirpy.scss'}
## Reverse Footnote