Skip to content

Instantly share code, notes, and snippets.

View napvlm's full-sized avatar
🌊
Working from home

Ruslan napvlm

🌊
Working from home
  • Toronto
View GitHub Profile
@leymannx
leymannx / iterm2-oh-my-fish.md
Last active May 5, 2024 13:53
iTerm2 Solarized Dark theme + Fish shell + oh-my-fish /// macOS High Sierra
@elitan
elitan / ContactForm.js
Last active November 9, 2022 05:21
React Router V4 Redirect after form submission
import React, { Component } from 'react';
import { withRouter } from 'react-router-dom'; // <--- import `withRouter`. We will use this in the bottom of our file.
class ContactForm extends Component {
submitForm (e) {
e.preventDefault()
this.props.history.push('/thank-you'); // <--- The page you want to redirect your user to.
}
@lukecav
lukecav / functions.php
Created August 17, 2016 16:24
Change the currency symbol from '$' to 'USD' in Woocommerce
add_filter( 'woocommerce_currency_symbol', 'change_currency_symbol', 10, 2 );
function change_currency_symbol( $symbols, $currency ) {
if ( 'USD' === $currency ) {
return 'USD';
}
if ( 'EUR' === $currency ) {
return 'Euro';
}
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';