View slider-2-createThumbControl.js
This file contains 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 createThumbControl(thumbObject, thumb, minValue, maxValue, pixels, orientation) { | |
if (orientation !== 'horizontal' && orientation !== 'vertical') { | |
throw new Error('Orientation must be either \'horizontal\' or \'vertical\''); | |
} | |
if (isNaN(thumb.stepSize)) { | |
throw new Error('Step size must be a number.'); | |
} | |
if (isNaN(thumb.initialValue)) { |
View stripe-elements-lowercase-placeholder.js
This file contains 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.card = this.elements.create("card", { style: { | |
base: { | |
"::placeholder": { | |
textTransform: "lowercase" | |
} | |
} | |
}}) |
View index.html
This file contains 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
<!DOCTYPE html> | |
<body> | |
<style> | |
body { | |
font-family: sans-serif; | |
padding: 20px; | |
margin: 0; | |
} | |
</style> | |
<form> |
View init.diff
This file contains 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
diff --git a/spec/compiler/crystal/tools/init_spec.cr b/spec/compiler/crystal/tools/init_spec.cr | |
index 7d59a6586..49199397c 100644 | |
--- a/spec/compiler/crystal/tools/init_spec.cr | |
+++ b/spec/compiler/crystal/tools/init_spec.cr | |
@@ -6,6 +6,7 @@ require "ini" | |
require "spec" | |
require "yaml" | |
require "../../../support/tempfile" | |
+require "../../../support/env" | |
View hacker-news-filter.js
This file contains 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
// ==UserScript== | |
// @name De-Culture-War Hacker News | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Hides any Hacker News story with more comments than points. | |
// @author Nate Berkopec | |
// @include https://news.ycombinator.com/* | |
// @grant none | |
// ==/UserScript== |
View Gemfile
This file contains 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
source "https://rubygems.org" | |
ruby File.read(".ruby-version").strip | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
gem "activeadmin" | |
gem "activeadmin_json_editor" | |
gem "ahoy_email" | |
gem "ahoy_matey" |
View checked_controller.js
This file contains 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
import { Controller } from "stimulus" | |
export default class extends Controller { | |
static targets = ["input"] | |
connect() { | |
this.update() | |
} | |
update() { |
View date_controller.js
This file contains 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
import { Controller } from "stimulus" | |
import strftime from "strftime" | |
import { capitalize } from "src/helpers" | |
const LOCALIZED_STRFTIME = { | |
en: strftime.localizeByIdentifier("en_US"), | |
fr: strftime.localizeByIdentifier("fr_FR"), | |
es: strftime.localizeByIdentifier("es_MX"), | |
it: strftime.localizeByIdentifier("it_IT"), | |
de: strftime.localizeByIdentifier("de_DE"), |
View datetime_controller.js
This file contains 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
import { Controller } from "stimulus" | |
import strftime from "strftime" | |
import { capitalize } from "src/helpers" | |
const LOCALIZED_STRFTIME = { | |
en: strftime.localizeByIdentifier("en_US"), | |
fr: strftime.localizeByIdentifier("fr_FR"), | |
es: strftime.localizeByIdentifier("es_MX"), | |
it: strftime.localizeByIdentifier("it_IT"), | |
de: strftime.localizeByIdentifier("de_DE"), |
View image_preview_controller.js
This file contains 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
import { Controller } from "stimulus" | |
const c = window.socializus?.constants | |
const t = window.socializus?.translations | |
export default class extends Controller { | |
static targets = ["output", "input", "error", "button", "name"] | |
readURL() { | |
const files = this.inputTarget.files |
OlderNewer