Radical Mode will make your browsing experience much more radical than you are used to. You will literally want to buy me a beer. And you should.
Check it out at one of these places:
export default const splitn = (s, d, n = Infinity) => { | |
const a = s.split(d); | |
return [ | |
...a.slice(0, n - 1), | |
...(a.length >= n ? [a.slice(n - 1).join(d)] : []) | |
]; | |
}; |
export const repeat = (str, num) => `${Array(num + 1)}`.replaceAll(/,/g, str); | |
export const kebabCase = (string, delimiter = " ") => | |
string | |
.split(delimiter) | |
.map((word) => [ | |
`${Number.NEGATIVE_INFINITY}`.slice(0, 1)[0], | |
word.toLowerCase(), | |
]) | |
.flat() |
function verses(bottles) { | |
const count = (b, cap) => `${b || `${cap ? 'N' : 'n'}o more`} bottle${b == 1 ? '' : 's'}`; | |
return [...new Array(bottles + 1)].map((v, i) => bottles - i).map(b => [ | |
`${count(b, true)} of beer on the wall, ${count(b)} of beer.`, | |
b > 0 | |
? `Take one down and pass it around, ${count(b - 1)} of beer on the wall.` | |
: `Go to the store and buy some more, ${count(bottles)} of beer on the wall.` | |
]); | |
} |
// Returns true about 50% of the time, false about 50% of the time. | |
export default const maybe = () => Math.random() < .5; | |
// This should be closer to .5 the more iterations you run. | |
export const tester = iterations => { | |
let yes = 0; | |
for (let i = 0; i < iterations; i++) maybe() && yes++; | |
return yes/iterations; | |
} |
export default function strRepeat (str, repeat) { | |
let curStr = str, i = 1, result = ''; | |
while (true) { | |
if (i & repeat) result += curStr; | |
i *= 2; | |
if (i >= repeat) break; | |
curStr += curStr; | |
} | |
return result; | |
} |
Array.prototype.insertInOrder = function(item) { | |
for (var i = 0; this[i] < item && i < this.length; i++); | |
this.splice(i, 0, item); | |
}; |
<html> | |
<body style="font-size: 16pt;"> | |
<p style="text-align: center;">Email: <a href="mailto:chark1212@gmail.com">chark1212@gmail.com</a></p> | |
<p style="text-align: center;">Cell: <a href="tel:+18582292679">858-229-2679</a></p> | |
</body> | |
</html> |
/*! | |
* Bootstrap v3.3.7 (http://getbootstrap.com) | |
* Copyright 2011-2016 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/ | |
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ | |
html { | |
font-family: sans-serif; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; |
Radical Mode will make your browsing experience much more radical than you are used to. You will literally want to buy me a beer. And you should.
Check it out at one of these places:
function titleSeach (title, archived) { | |
return fetch( | |
'/api/titlesearch.php?title=' + | |
encodeURIComponent(title) + | |
'&archived=' + | |
encodeURIComponent(JSON.stringify(archived)) | |
).then(res => { | |
if (!res.ok) return Promise.reject(res); | |
return res.json() | |
}); |