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
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; |
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
.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; |
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
.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; |
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 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
window.stopEscapeDefault = function(e){ if(e.key === "Escape"){ e.preventDefault(); console.log("prevented defocus"); } }; | |
// onkeydown="window.stopEscapeDefault(event)" |
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
-- Helper functions that are useful to customize the openspace.cfg loading | |
--[[ | |
########################################################################################## | |
Public functions | |
########################################################################################## | |
]]-- | |
-- SGCT related functions | |
sgct = {} |
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
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 |
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
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" |
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
[!-- Featured Article --] | |
[[module ListPages category="featured" order="dateCreatedDesc" limit="1"]] | |
++* Featured Article: [%%link%% %%content{1}%%] | |
%%content{2}%% | |
[[/module]] |
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
{ | |
"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, |
NewerOlder