From 72730abc1dbda44215272fe377733af4b9be2d73 Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Sun, 3 Sep 2023 19:33:16 -0700 Subject: [PATCH] Add Makefile --- Makefile | 32 ++++++++ _config.yml | 2 +- _includes/about.md | 2 +- _layouts/index.html | 4 + _posts/cli/2009-04-23-bash-imageslice.md | 5 +- _posts/cli/2011-04-16-ssh_keys.md.md | 10 ++- .../cli/2011-11-09-osx_command_line_audio.md | 21 +++-- _posts/cli/2023-08-03-srv.md | 59 +++++++++++++ _posts/snippets/2007-12-12-mel-notepad.md | 82 +++++++++---------- .../2009-06-12-mel-sphere_intersect.md | 10 +-- css/highlight.css | 2 +- publish | 7 -- serve | 1 - 13 files changed, 162 insertions(+), 75 deletions(-) create mode 100644 Makefile create mode 100644 _posts/cli/2023-08-03-srv.md delete mode 100755 publish delete mode 100755 serve diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b2fbea7 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +.PHONY: init install dev build push clean publish + +init: + bundle init + bundle add jekyll --version "~>4.2" + +install: + bundle config set --local path 'vendor/bundle' + bundle install + bundle update + +dev: + bundle exec jekyll serve --livereload --port 4000 + +build: + bundle exec jekyll build --config _config.yml + +push: + git push + git push quilime + git push gitea + git push local + +clean: + rm -rf _site + + +DEST := quilime@quilime.com:/home/quilime +publish: + make clean + make build + rsync -varz _site/ $(DEST)/quilime.com/public/ --delete diff --git a/_config.yml b/_config.yml index 7e15103..3889009 100644 --- a/_config.yml +++ b/_config.yml @@ -1,5 +1,6 @@ title: quilime.com name: quilime +analytics: 276ecb7f-7ea5-4d5b-9c59-991116fd22e6 baseurl: "" url: "https://quilime.com" excerpt_separator: "" @@ -10,7 +11,6 @@ kramdown: input: GFM highlighter: rouge - plugins: - jekyll-feed - jekyll-paginate diff --git a/_includes/about.md b/_includes/about.md index cfbf7e8..f19a10c 100644 --- a/_includes/about.md +++ b/_includes/about.md @@ -1,4 +1,4 @@ -Welcome to `quilime.com` — a blog of open source projects, code snippets, and command line notes. +`quilime.com` is a blog of open source projects, code snippets, and command line notes. You can also view my [personal website](https://gabrieldunne.com), and [github](https://www.github.com/quilime). diff --git a/_layouts/index.html b/_layouts/index.html index 928376b..c16fce3 100644 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -7,8 +7,12 @@ + + + + diff --git a/_posts/cli/2009-04-23-bash-imageslice.md b/_posts/cli/2009-04-23-bash-imageslice.md index 114df66..a83bca2 100644 --- a/_posts/cli/2009-04-23-bash-imageslice.md +++ b/_posts/cli/2009-04-23-bash-imageslice.md @@ -7,14 +7,11 @@ category: cli layout: post --- -Shell script that slices a single image into any number of vertical and horizontal sections. - +Shell script that slices a single image into any number of vertical and horizontal sections. Using [ImageMagik `convert`](https://imagemagick.org/script/convert.php) ```bash - #!/bin/bash -# @author gabriel dunne IMAGE=$1 IMAGE_W=$2 diff --git a/_posts/cli/2011-04-16-ssh_keys.md.md b/_posts/cli/2011-04-16-ssh_keys.md.md index 72aed49..44d02b2 100644 --- a/_posts/cli/2011-04-16-ssh_keys.md.md +++ b/_posts/cli/2011-04-16-ssh_keys.md.md @@ -4,12 +4,14 @@ title: "create ssh keys" date: 2011-04-16 category: cli --- -
+```bash
 ssh-keygen -t rsa
-// linux
+
+# linux
 ssh-copy-id [user@]host
-// osx
+
+# macos
 cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys"
 eval `ssh-agent`
 ssh-add
-
+``` diff --git a/_posts/cli/2011-11-09-osx_command_line_audio.md b/_posts/cli/2011-11-09-osx_command_line_audio.md index c65b5d0..4b53cfa 100644 --- a/_posts/cli/2011-11-09-osx_command_line_audio.md +++ b/_posts/cli/2011-11-09-osx_command_line_audio.md @@ -17,22 +17,27 @@ install homebrew, and then instal ## examples cat audio from /dev/urandom/ : -
cat /dev/urandom | sox -traw -r44100 -b16 -u - -tcoreaudio
+```bash +cat /dev/urandom | sox -traw -r44100 -b16 -u - -tcoreaudio +``` -audio from an executable -
-cat > test.c
+new file `test.c`
+
+```c
+# test.c
 main(t) {
   for( t = 0;;t++)
     putchar( t * ((( t >> 12 ) | (t >> 8)) & (63& (t >> 4 ))));
 }
-
-[ctrl-c] -
+```
+
+run
+
+```bash
 gcc test.c -o test
 ./test | sox -traw -r8000 -b8 -u - -tcoreaudio
-
+``` diff --git a/_posts/cli/2023-08-03-srv.md b/_posts/cli/2023-08-03-srv.md new file mode 100644 index 0000000..3c66746 --- /dev/null +++ b/_posts/cli/2023-08-03-srv.md @@ -0,0 +1,59 @@ +--- +title: "server" +date: 2023-08-03 +category: cli +--- + + +- Intel nuc i3 +- CPU: Intel i3-3217U (4 core) @ 1.7 GHz +- Memory: 16Gb +- OS: Manjaro Linux x86_64 +- Shell: zsh + + + +## packages + +- [mosh](https://mosh.org/) roaming ssh sessions +- [tmux](https://github.com/tmux/tmux/wiki) terminal multiplexer +- [zerotier](https://www.zerotier.com/) vpn +- [resilio sync](https://www.resilio.com/) file sync +- [keepasstouch](https://keepassxc.org/) password safe + + \ No newline at end of file diff --git a/_posts/snippets/2007-12-12-mel-notepad.md b/_posts/snippets/2007-12-12-mel-notepad.md index d4b2f72..a5e654b 100644 --- a/_posts/snippets/2007-12-12-mel-notepad.md +++ b/_posts/snippets/2007-12-12-mel-notepad.md @@ -7,41 +7,42 @@ category: snippets mel notepad with various code snippets - +## nodes process selection list -
string $select[] = `ls -sl`;
+
+```php
+string $select[] = `ls -sl`;
 for ( $node in $select ) // process each
 {
    /* ... */
 }
-
- -
+``` if node exists -
+
+```php
 string $node = "object";
 if ( `objExists $node` )
 {
    // The node exists
 }
-
+``` -

regexp

+## regexp Strip component -
+
+```php
 string $node = "pCube1.f[2]";
 string $no_component = `match "^[^\.]*" $node`;
 // Result: "pCube1" //
-
+``` - -
Extract component or attribute, with '.' -
+
+```php
 string $node = "pCube1.f[2]";
 string $component = `match "\\..*" $node`;
 // Result: ".f[2]" //
@@ -49,12 +50,12 @@ string $component = `match "\\..*" $node`;
 string $nodeAttr = "blinn1.color";
 string $attrName = `match "\\..*" $nodeAttr`;
 // Result: ".color" //
-
+``` -
Extract attribute name, without '.' -
+
+```php
 string $node = "pCube1.f[2]";
 string $component = `substitute "^[^.]*\\." $node ""`;
 // Result: "f[2]" //
@@ -62,68 +63,67 @@ string $component = `substitute "^[^.]*\\." $node ""`;
 string $nodeAttr = "blinn1.color";
 string $attrName = `substitute "^[^.]*\\." $nodeAttr ""`;
 // Result: "color" //
-
+``` -
Extract parent UI control from full path -
+
+```php
 string $uiControl = "OptionBoxWindow|formLayout52|formLayout55|button6";
 string $uiParent = `substitute "|[^|]*$" $uiControl ""`;
 // Result: OptionBoxWindow|formLayout52|formLayout55 //
-
+``` + +Strip trailing Line Break (\n), if any.This is useful when processing text input read from a file using `fgetline`. -
-Strip trailing Line Break (\n), if any.

This is useful when processing text input read from a file using `fgetline`. -
+```php
 string $input = "line\n";
 $string $line = `match "^[^(\r\n)]*" $input`;
 // Result: "line" //
-
+``` -
Extract directory from path. -

Keep the trailing slash for ease of use. -
+
+```php
 string $path = "C:/AW/Maya5.0/bin/maya.exe";
 string $dir = `match "^.*/" $path`;
 // Result: "C:/AW/Maya5.0/bin/"
-
+``` -
Extract file from path -
+
+```php
 string $path = "C:/AW/Maya5.0/bin/maya.exe";
 string $filepart = `match "[^/\\]*$" $path`;
 // Result: "maya.exe"
-
+``` -
Strip numeric suffix -
+
+```php
 
 string $node = "pCube1|pCubeShape223";
 string $noSuffix = `match ".*[^0-9]" $node`;
 // Result: "pCube1|pCubeShape"
-
+``` -
Extract numeric suffix -
+
+```php
 string $node = "pCube1|pCubeShape223";
 string $suffix = `match "[0-9]+$" $node`;
 // Result: "223" //
-
+``` -
Extract short name of DAG or control path -
+
+```php
 string $dagPath = "pCube1|pCubeShape223";
 string $shortName = `match "[^|]*$" $dagPath`;
 // Result: pCubeShape223 //
-
+``` -

more references

+## more references - [https://danielfaust.github.io/ewertb/maya.html](https://danielfaust.github.io/ewertb/maya.html) diff --git a/_posts/snippets/2009-06-12-mel-sphere_intersect.md b/_posts/snippets/2009-06-12-mel-sphere_intersect.md index 5211b91..9672be2 100644 --- a/_posts/snippets/2009-06-12-mel-sphere_intersect.md +++ b/_posts/snippets/2009-06-12-mel-sphere_intersect.md @@ -6,18 +6,14 @@ lang: mel layout: post category: snippets --- -

+ Function to return location of intersect with poly mesh and spherical object moving in the positive direction on the Y axis. -
-

-

-mel source -

+## mel source -```bash +```php global proc intersectSphereY() { print(". . . . . go go go\n"); diff --git a/css/highlight.css b/css/highlight.css index 4bee9b3..c9b0c7a 100644 --- a/css/highlight.css +++ b/css/highlight.css @@ -1,7 +1,7 @@ .highlight table td { padding: 5px; } .highlight table pre { margin: 0; } .highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf { - color: #5e5d83; + color: #5F749B; font-style: italic; } .highlight .cm { diff --git a/publish b/publish deleted file mode 100755 index ddd8cf7..0000000 --- a/publish +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -echo "Building..." -rm -rf _site -bundle exec jekyll build --config _config.yml -echo "Syncing..." -rsync -varz _site/ quilime@quilime.com:/home/quilime/quilime.com/public/ --delete $EXCLUDE diff --git a/serve b/serve deleted file mode 100755 index 414c0c7..0000000 --- a/serve +++ /dev/null @@ -1 +0,0 @@ -bundle exec jekyll serve -- 2.34.1