Skip to content

Instantly share code, notes, and snippets.

View entepe85's full-sized avatar
😎

Nils Torbjörn Petersen entepe85

😎
View GitHub Profile
@entepe85
entepe85 / memorySizeOf.js
Created April 11, 2024 08:40 — forked from rajinwonderland/memorySizeOf.js
Calculate Memory Size of a JS Object
function memorySizeOf(obj) {
var bytes = 0;
function sizeOf(obj) {
if (obj !== null && obj !== undefined) {
switch (typeof obj) {
case "number":
bytes += 8;
break;
case "string":
@entepe85
entepe85 / FirefoxDeveloperEdition.desktop
Created April 23, 2022 18:24
.desktop file for Firefox Developer Edition on Pantheon / elementary OS
[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition
GenericName=Web Browser
Exec=/home/torbjoern/.local/opt/firefox/firefox %u
Terminal=false
Icon=firefox-developer-icon
Type=Application
Categories=Network;WebBrowser;Favorites;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/ftp;x-scheme-handler/http;x-scheme-handler/https;
@entepe85
entepe85 / ruleset.xml
Last active May 15, 2020 08:29
PHPCS ruleset for bdrops
<?xml version="1.0"?>
<ruleset name="bdrops Standard" namespace="bdrops\CS\Standard">
<description>bdrops PHPCS coding standards</description>
<rule ref="PSR12">
<exclude name="PSR1.Methods.CamelCapsMethodName" />
<exclude name="Generic.Files.LineLength" />
</rule>
<rule ref="Symfony">
<exclude name="Symfony.Commenting.License" />
<exclude name="Symfony.Functions.Arguments" />
@entepe85
entepe85 / .editorconfig
Last active October 24, 2018 07:03
Drupal 8 build tool files
# Drupal editor configuration normalization
# @see http://editorconfig.org/
# This is the top-most .editorconfig file; do not search in parent directories.
root = true
# All files.
[*]
end_of_line = LF
indent_style = space
@entepe85
entepe85 / .stylelintrc
Last active February 19, 2018 09:14
Stylelint config
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 4,
"string-quotes": "single",
"no-duplicate-selectors": true,
"color-hex-case": "lower",
"color-hex-length": "long",
"selector-no-qualifying-type": true,
"selector-combinator-space-after": "always",
@entepe85
entepe85 / 0_reuse_code.js
Created April 21, 2017 13:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@entepe85
entepe85 / ata.json
Last active May 27, 2020 12:02
Visual Studio Code Sync Settings GIST
{
"api": {
"CredentialUserData": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/CredentialUserData",
"support": {
"chrome": {
"version_added": "60"
},
"chrome_android": {
@entepe85
entepe85 / TwoColumns.html
Created November 18, 2014 13:18
Fluidcontent - Two column FCE
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<f:layout name="Content"/>
<f:section name="Configuration">
<flux:form id="twoColConfig" options="{group: 'Layout', icon: '{f:uri.resource(path: \'Icons/ext_icon.gif\')}'}">
<flux:grid>
<flux:grid.row>
<flux:grid.column name="leftCol"
style="width: {f:if(condition: '{layout} == 0', then: '23%')}{f:if(condition: '{layout} == 1', then: '31%')}{f:if(condition: '{layout} == 2', then: '48%')}{f:if(condition: '{layout} == 3', then: '64%')}{f:if(condition: '{layout} == 4', then: '73%')}; margin-right: .5em;">