Discover gists
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
# Attempts to demangle all mangled symbols in the current program using the Rust | |
# mangling schemes, and replace the default symbol and function signature | |
# (if applicable) with the demangled symbol. | |
# | |
# License: MIT OR Apache-2.0 | |
#@author Jack Grigg <thestr4d@gmail.com> | |
#@category Symbol | |
import string |
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
mmultiply = function(a,b) { | |
return a.map(function(x,i) { | |
return transpose(b).map(function(y,k) { | |
return dotproduct(x, y) | |
}); | |
}); | |
} | |
dotproduct = function(a,b) { | |
return a.map(function(x,i) { |
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
r""" | |
____ _ _ | |
| _ \ | | | | | |
| |_) | ___ __| |_ __ ___ ___| | __ | |
| _ < / _ \/ _` | '__/ _ \ / __| |/ / | |
| |_) | __/ (_| | | | (_) | (__| < | |
|____/ \___|\__,_|_| \___/ \___|_|\_\ | |
|_ _| | | (_) | |
| | _ __ | |_ ___ _ ____ ___ _____ _____ _ __ | |
| | | '_ \| __/ _ \ '__\ \ / / |/ _ \ \ /\ / / _ \ '__| |
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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
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
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################ | |
############ also be sure to RESTART OpenProject after replacing the file. ################ | |
############ it doesn't show that enterprise mode is enabled in the settings, but all ################ | |
############ enterprise mode features, such as KanBan boards, are enabled. ################ | |
#-- copyright | |
# OpenProject is an open source project management software. | |
# Copyright (C) 2012-2023 the OpenProject GmbH | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License version 3. |
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
.login-form-flex { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100%; | |
} | |
.button-flex-container { | |
display: flex; | |
width: 100%; |
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
/*** MIT LICENSE | |
Copyright (c) 2022 torcado | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the | |
Software is furnished to do so, subject to the following |
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 hexToRgba(st) { | |
if(st.startsWith("#")) | |
st = st.slice(1); | |
const len = st.length; // I don't know how JS works, I suspect this is recalculated | |
const has_alpha = !(len % 4); | |
if(len % 3 && !has_alpha) | |
throw new Error("invalid hex code"); | |
var val = Number.parseInt(st, 16); |
NewerOlder