Skip to content

Instantly share code, notes, and snippets.

View swestphal's full-sized avatar
☃️
Winter is here

Simone Westphal swestphal

☃️
Winter is here
View GitHub Profile
@swestphal
swestphal / gist:c4bc6cec81e2f4e1dac4e178f7ade90a
Created May 4, 2025 10:14 — forked from dreampulse/gist:d4c47d896c88385830f8
German currency format for JavaScript using numeral.js
var numeral = require('numeral');
var numeralDE = require('numeral/languages/de');
numeralDE.delimiters.thousands = '.';
numeral.language('de', numeralDE);
numeral.language('de');
numeral(1024).format('0,0.00');
@swestphal
swestphal / gist:1e4018226e6be48fb945c1c2ac92e00b
Created January 29, 2023 13:26 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@swestphal
swestphal / gist:e9811d1972ab380ac6d8023cdb918bd2
Created January 29, 2023 13:26 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@swestphal
swestphal / django_deploy.md
Created March 14, 2021 15:45 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@swestphal
swestphal / App.js
Created January 10, 2021 15:32 — forked from koistya/App.js
How to add `onscroll` event in ReactJS component
import React from 'react';
let lastScrollY = 0;
let ticking = false;
class App extends React.Component {
componentDidMount() {
window.addEventListener('scroll', this.handleScroll, true);
}
@swestphal
swestphal / sanitySchemas.js
Created December 15, 2020 16:43 — forked from artemartemov/sanitySchemas.js
Sanity Schema for Background Image Slider for Gatsby.js
// My indexPage.js schema is where I am including the slider --
export default {
name: 'indexPage',
type: 'document',
title: 'Homepage',
__experimental_actions: [/* 'create', */ 'update' /* 'delete', */, 'publish'],
fields: [
{
type: 'array',
name: 'bgImages',
@swestphal
swestphal / App.js
Created October 17, 2020 10:43
create react app with older verion
npx create-react-app@1.5.2 first_app --scripts-version=react-scripts@1.1.4
@swestphal
swestphal / gist:f275435780fb0310bec2ebc600bd4a6e
Created February 1, 2020 11:23 — forked from mrchess/gist:1820380
Exposes a variable openHTTPs which keeps track of how many XMLHttpRequests you have active.
<script>
(function() {
var oldOpen = XMLHttpRequest.prototype.open;
window.openHTTPs = 0;
XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
window.openHTTPs++;
this.addEventListener("readystatechange", function() {
if(this.readyState == 4) {
window.openHTTPs--;
}
@swestphal
swestphal / woo-add-custom-sku.php
Created April 9, 2019 06:55 — forked from jan-koch/woo-add-custom-sku.php
Add a custom SKU field to WooCommerce products.
<?php
function jk_add_custom_sku() {
$args = array(
'label' => __( 'Custom SKU', 'woocommerce' ),
'placeholder' => __( 'Enter custom SKU here', 'woocommerce' ),
'id' => 'jk_sku',
'desc_tip' => true,
'description' => __( 'This SKU is for internal use only.', 'woocommerce' ),
);