Skip to content

Instantly share code, notes, and snippets.

View stavrossk's full-sized avatar
🎯
Focusing

Stavros Skamagkis stavrossk

🎯
Focusing
View GitHub Profile
@stavrossk
stavrossk / woocommerce-shipping-contact.php
Created June 7, 2023 11:34 — forked from helgatheviking/woocommerce-shipping-contact.php
Add a shipping email/phone field to checkout and notify of new orders
<?php
/*
Plugin Name: WooCommerce Shipping Contact
Plugin URI: https://github.com/helgatheviking/wc-shipping-contact
Description: Add a shipping email field to checkout and notify of new orders
Version: 1.1.0
Author: Kathy Darling
Author URI: http://kathyisawesome.com
Requires at least: 4.0
Tested up to: 4.8
On MacOS terminal
===============
1. Run the following command to install the express generator
~ sudo npm install express-generator -g
2. Create a folder for the application
~ mkdir azurenodejsapp
~ cd azurenodejsapp
@stavrossk
stavrossk / Simple-Gets
Created December 6, 2018 03:54 — forked from travelingtonic/Simple-Gets
Simple GET Requests Assignments
Assignments
1. Create an app that lets users choose to display between 1 and 50 random dog images, then prints the results to the console. The app should feature a form with a required input where users indicate the number of images to retrieve, and the input should default to 3. Use the endpoint described in the "DISPLAY MULTIPLE RANDOM IMAGES FROM ALL DOGS COLLECTION" section of this page of the DogAPI docs.
https://repl.it/@travelingtonic/simple-get-assignment-1
2. Building on the previous app, create an app that lets users choose to display between 1 and 50 random dog images, then loads the images in the console. This app should adhere to all of the requirements from the first one, in addition to displaying the images in the DOM.
https://repl.it/@travelingtonic/simple-get-assignment-2
3. Create an app that loads a single random image for a specific breed. This app should account for the happy case when the breed is found, as well as the unhappy case when it is not. Use the endpoint described in th
@stavrossk
stavrossk / CustomStringEscapeUtil.java
Created December 6, 2018 03:53 — forked from mutsune/CustomStringEscapeUtil.java
(Part of) custom apache commons StringEscapeUtil like PHP htmlspecialchars
final private static CharSequenceTranslator quotes = buildAggregateTranslator(Mode.ENT_QUOTES);
final private static CharSequenceTranslator noquotes = buildAggregateTranslator(Mode.ENT_NOQUOTES);
private static AggregateTranslator buildAggregateTranslator(Mode mode) {
Map<CharSequence, CharSequence> map = new HashMap<>();
if (mode == Mode.ENT_QUOTES) {
map.put("\"", "&quot;"); // " - double-quote
map.put("'", "&apos;"); // ' - apostrophe
}
@stavrossk
stavrossk / irc_games.md
Created June 4, 2018 22:14 — forked from myano/irc_games.md
This is a list of games that are playable on IRC.

List of on-IRC games

AlphaChat

  • #multirpg

BakaShiMoe

@stavrossk
stavrossk / DI.m3u
Created April 24, 2018 06:06 — forked from sim642/DI.m3u
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi
@stavrossk
stavrossk / introrx.md
Last active August 29, 2015 14:08 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@stavrossk
stavrossk / css_resources.md
Created March 4, 2014 20:55 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@stavrossk
stavrossk / python_resources.md
Created March 4, 2014 20:55 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@stavrossk
stavrossk / rails_resources.md
Created March 4, 2014 20:55 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h