This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Nanoc::Check.define(:html_proofer) do | |
| res = `bundle exec htmlproofer --root-dir=output --disable-external --no-enforce-https --ignore-missing-alt --directory-index-files=index.html,index.php 2>&1` | |
| if $?.exitstatus != 0 | |
| add_issue("html-proofer failed: #{res}") | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const Rc = @This(); | |
| ptr: *anyopaque, | |
| ref_count_ptr: *u8, | |
| deinit: *const fn (self: *const anyopaque) void, | |
| pub fn refCount(self: *const Rc) u8 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const Self = @This(); | |
| ref_count: u8 = 1, | |
| allocator: std.mem.Allocator, | |
| content: union(enum) { | |
| owned: struct { | |
| data: []const u8, | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function git_sync --description 'Brings all Git branches up to date' | |
| set -l orig_branch (git rev-parse --abbrev-ref HEAD) | |
| set -l repo_path (git rev-parse --show-toplevel) | |
| set -l main_branch_name | |
| if git show-ref --verify --quiet refs/heads/master | |
| set main_branch_name master | |
| else if git show-ref --verify --quiet refs/heads/main | |
| set main_branch_name main | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Hi denis, | |
| sorry if this was annoying to answer your requests | |
| 1. the purposes of the processing: was to send a funny roast to thank dev who | |
| contribute to open source (nanoc in your case) this is not for any commercial | |
| purpose and we did not nor will store any email / data etc... | |
| 2. the categories of personal data concerned: email |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class left_pad: | |
| def __init__(this,PadChar=' ',width=4): | |
| this.PadChar=PadChar | |
| this.width = width | |
| def LeftPad(this,stringToPadWithChar): | |
| charsToPad=this.width-len(stringToPadWithChar) | |
| OutStr='' | |
| if(charsToPad>0): | |
| for i in range(0,charsToPad): | |
| OutStr=OutStr+this.PadChar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # UNTESTED | |
| # In lib/ somewhere | |
| Nanoc::Filter.new(:fetch_snapshot_textual) do |content, params| | |
| item = @items[params.fetch(:item)] | |
| rep = item.reps[params.fetch(:rep, :default)] | |
| compiled_content = rep.compiled_content(snapshot: params.fetch(:snapshot)) | |
| compiled_content | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*********************************************************** | |
| * config | |
| */ | |
| :root { | |
| --base-size: 0.3625rem; | |
| --size-1: calc(1 * var(--base-size)); | |
| --size-2: calc(2 * var(--base-size)); | |
| --size-3: calc(4 * var(--base-size)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| current directory: /Users/denis/.rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/rdiscount-2.2.7.2/ext | |
| /Users/denis/.rubies/ruby-3.3.0/bin/ruby extconf.rb | |
| checking for random()... yes | |
| checking for srandom()... yes | |
| checking for rand()... yes | |
| checking for srand()... yes | |
| checking size of unsigned long... 8 | |
| checking size of unsigned int... 4 | |
| checking size of unsigned int... 4 | |
| checking size of unsigned short... 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'io/console' | |
| # Query RGB background color | |
| raw = STDIN.raw do |stdin| | |
| print "\e]11;?\a" | |
| stdin.read(25) | |
| end | |
| # Parse | |
| r, g, b = raw.scan(/[0-9a-f]{4}/).map { |part| part.to_i(16) / 65_535.0 } |
NewerOlder