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
module.exports = { | |
minify: false, | |
outputPath: "frontend/styles/funky-utilities.css", | |
breakpoints: { | |
xs: { max: "575px" }, | |
sm: { min: "576px", max: "767px" }, | |
md: { min: "768px", max: "991px" }, | |
lg: { min: "992px", max: "1199px" }, | |
xl: { min: "1200px", max: "1399px" }, | |
xxl: "1400px" |
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
<timeline-post post-id="54235" source-id="13" > | |
<sl-card style="margin-bottom: var(--sl-spacing-large)"> | |
<a href="https://appleinsider.com/articles/21/05/11/jamf-acquires-zero-trust-cloud-security-startup-wandera-in-400m-deal?utm_medium=rss" target="_blank" slot="image"><img | |
src="https://photos5.appleinsider.com/gallery/41951-81380-34258-61556-jamf-pro-head-xl-xl.jpg" | |
alt="article thumbnail" | |
class="post-thumbnail" | |
/></a> | |
<h3><a target="_blank" class="link" href="https://appleinsider.com/articles/21/05/11/jamf-acquires-zero-trust-cloud-security-startup-wandera-in-400m-deal?utm_medium=rss">Jamf acquires 'zero trust' cloud security startup Wandera in $400M deal</a></h3> |
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 Ruby | |
end | |
def am(input) | |
"am #{input}" | |
end | |
def I(input) | |
"I #{input}" | |
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
### The Setup | |
Kernel.define_method(:"`") do |val| | |
val | |
end | |
def const(val) | |
val | |
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
<cable-car href="/cc/cable_car" csrf-token="94IkWdvagUHWPGVkD+VeBFVjGoM0zXAf6tgm6BPU+kEpOj2BTtI6bXJQzEDXGAF+R6Dc1ek7oNouatTMrbUy"> | |
<button | |
onclick="this.closest('cable-car').post(this, {extra: 123})" | |
data-x="1" | |
output="#show-the-things" | |
> | |
Do a thing! | |
</button> | |
<section id="show-the-things"></section> |
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
load-rails-env() { | |
if [ -f ".rails_env" ]; then | |
export RAILS_ENV=$(cat .rails_env) | |
else | |
export RAILS_ENV=production | |
fi | |
} | |
add-zsh-hook chpwd load-rails-env |
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
# This file runs fine in Ruby 2.7.2 and errors out in Ruby 3.0.2 with: | |
# testkwargs.rb:15:in `method_missing': no implicit conversion of Foo into Hash (TypeError) | |
# from testkwargs.rb:31:in `<main>' | |
class Helpers | |
end | |
class Foo | |
def wee(a=1, b:2) | |
puts a |
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
Object.class_eval do | |
def self.assign(obj, options={}) | |
options.each do |k, v| | |
obj.send("#{k}=", v) | |
end | |
obj | |
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
<div class="bg-gradient-to-b from-pink-100 to-purple-200"> | |
<div class="container m-auto px-6 py-20 md:px-12 lg:px-20"> | |
<div class="m-auto text-center lg:w-8/12 xl:w-7/12"> | |
<h2 class="text-2xl text-pink-900 font-bold md:text-4xl">…</h2> | |
</div> | |
<div class="mt-12 m-auto -space-y-4 items-center justify-center md:flex md:space-y-0 md:-space-x-4 xl:w-10/12"> | |
<div class="relative z-10 -mx-4 group md:w-6/12 md:mx-0 lg:w-5/12"> | |
<div aria-hidden="true" class="absolute top-0 w-full h-full rounded-2xl bg-white shadow-xl transition duration-500 group-hover:scale-105 lg:group-hover:scale-110"></div> | |
<div class="relative p-6 space-y-6 lg:p-8"> | |
<h3 class="text-3xl text-gray-700 font-semibold text-center">…</h3> |
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 String | |
def middle_truncate(truncate_length = 30) | |
return self if length <= truncate_length + 2 | |
"#{self[..(truncate_length / 2)]}…#{self[-(truncate_length / 2)..]}" | |
end | |
end | |
puts "Well, this is a very long string and I hope I can see if it will truncate!".middle_truncate |