Skip to content

Instantly share code, notes, and snippets.

export const getUrlParameterValue = (name) => {
const results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
return results !== null ? results[1] || 0 : null;
};
export const updateParameterInUrl = (name, value) => {
const { protocol, host, pathname, search } = window.location;
const paramReg = new RegExp(name + '=[a-z]+');
const newSearch = search.replace(paramReg, name + '=' + value);
const newUrl = protocol + "//" + host + pathname + newSearch;
.element {
max-height: 5000px; /* super high just to have something */
opacity: 1;
transition: max-height 1s ease-in-out, opacity 0.5s ease-in-out;
}
.element.hidden {
visibility: hidden;
max-height: 0px;
opacity: 0;
.display(...) {
@process_oldwebkit: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-webkit-box":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
@process_moz: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-moz-box":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
@process_webkit: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-webkit-"+e:8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
@process_ms: ~`(function(e){return e="flex"==e?"-ms-flexbox":"inline-flex"==e?"-ms-inline-flexbox":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
@process: ~`(function(e){return"flex"!=e&&"inline-flex"!=e&&(e=8121991),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
display: @process_oldwebkit;
display: @process_moz;
display: @process_webkit;
display: @process_ms;
" ___
" ___ ___ /__/\
" /__/\ / /\ | |::\
" \ \:\ / /:/ | |:|:\
" \ \:\ /__/::\ __|__|:|\:\
" ___ \__\:\ \__\/\:\__ /__/::::| \:\
" /__/\ | |:| \ \:\/\ \ \:\~~\__\/
" \ \:\| |:| \__\::/ \ \:\
" \ \:\__|:| /__/:/ \ \:\
" \__\::::/ \__\/ \ \:\
window.stopEscapeDefault = function(e){ if(e.key === "Escape"){ e.preventDefault(); console.log("prevented defocus"); } };
// onkeydown="window.stopEscapeDefault(event)"
-- Helper functions that are useful to customize the openspace.cfg loading
--[[
##########################################################################################
Public functions
##########################################################################################
]]--
-- SGCT related functions
sgct = {}
local nextSunTexture = function()
local textures = {
'${DATA}/mas/br_photo_bas05_trans_20G_offset.png',
'${DATA}/mas/br_photo_bas05_trans_100G_offset.png',
'${DATA}/mas/br_photo_bas05_trans_1000G_offset.png'
}
local currentTex = openspace.getPropertyValue('Scene.Sun.renderable.ColorTexture')
local newIndex = 1
for i, tex in ipairs(textures) do
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
[!-- Featured Article --]
[[module ListPages category="featured" order="dateCreatedDesc" limit="1"]]
++* Featured Article: [%%link%% %%content{1}%%]
%%content{2}%%
[[/module]]
{
"workbench.colorTheme": "Gruvbox Dark (Hard)",
"window.zoomLevel": 1,
"editor.tabSize": 2,
"editor.fontFamily": "'Fira Code','Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.fontLigatures": true,
"vim.hlsearch": true,
"vim.easymotion": true,