Skip to content

Instantly share code, notes, and snippets.

View pcsontos's full-sized avatar
🎯
Focusing

Peter Csontos pcsontos

🎯
Focusing
View GitHub Profile
@pcsontos
pcsontos / css-bart-simpson.markdown
Last active January 22, 2019 21:44
CodePen - CSS Bart Simpson

CSS Bart Simpson

Cartoon of Bart Simpson drawn with HTML and CSS.


This week's CodePen challenge is about primary colors (in the shades #F44336, #1E88E5, #FDD835), so I remembered a certain cartoon character that basically matched those colors :P

I tested the drawing on Chrome, Firefox, and Safari, where it seems to look the same. Only a simulation was done for IE/Edge so, although it looked Ok, I don't know if that's the case.

@pcsontos
pcsontos / listing-1-4-a-functional-scope-example.markdown
Last active January 22, 2019 21:19
Listing 1-4. A “Functional Scope” Example
@pcsontos
pcsontos / Docker-Commands.md
Last active July 19, 2017 13:20
Useful docker commands
  1. To list all running and stopped containers

$ docker ps -a

  1. To list all running containers (just stating the obvious and also example use of -f filtering option)

$ docker ps -a -f status=running

  1. To list all running and stopped containers, showing only their container id
@pcsontos
pcsontos / ReadMe.md
Created July 19, 2017 12:05
docker teszt
  1. $ docker run [options] IMAGE [command] [arguments]
  2. $ docker stop [name]
  3. $ docker start [name]
  4. $ docker attache [name]
  5. $ docker ps -a
  6. $ docker rm -f [name]
wp-cli.phar search-replace 'http://example.dev' 'http://example.com' --skip-columns=guid
Or, if you only want to change the option, you can do:
wp-cli.phar option update home 'http://example.com'
wp-cli.phar option update siteurl 'http://example.com'
@pcsontos
pcsontos / gist:239d6e528c813711d517
Created September 7, 2015 11:45
Convert a Street Address to Latitude and Longitude, Google Maps geocoding service.
<?php
/*
* Given an address, return the longitude and latitude using The Google Geocoding API V3
*
*/
function Get_LatLng_From_Google_Maps($address) {