Skip to content

Instantly share code, notes, and snippets.

View dimitrismistriotis's full-sized avatar

Dimitrios Mistriotis dimitrismistriotis

View GitHub Profile
@dimitrismistriotis
dimitrismistriotis / setup_nginx
Created April 14, 2020 10:45
Latest nginx from repositories for Ubuntu script, for automatic deployment
#!/bin/bash
# ___ _ _ _ _ __ __
# / __| ___| |_ _ _ _ __ | \| |__ _(_)_ _ \ \/ /
# \__ \/ -_) _| || | '_ \ | .` / _` | | ' \ > <
# |___/\___|\__|\_,_| .__/ |_|\_\__, |_|_||_/_/\_\
# |_| |___/
#
# References:
#
# * https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
@dimitrismistriotis
dimitrismistriotis / README.md
Last active June 4, 2017 10:58
The number of Greeks who moved abroad during the crisis
@dimitrismistriotis
dimitrismistriotis / checklist.md
Last active June 20, 2023 08:56
Migrating to new Linux checklist
  • Additional keyboard
  • New Github/Gitlab certificate, or copy existing
  • MP3s
  • Videos
  • Txts with notes
  • Documents
  • Pycharm
  • Codium editor, settings, package manager, and packages
  • Codium editor: export/import profile from more recent installation
  • Other projects
@dimitrismistriotis
dimitrismistriotis / Readme.md
Last active February 23, 2016 14:46
A visualisation makeover

"Makeover" Assignment for Udacity's "Data visualisation and D3.js"

Decided to makeover: http://viz.wtf/post/139307186583/i-wonder-if-they-all-have-a-different-filling/embed

After some experimentation, dropped pie chart and went for a bar then:

  • One colour (all items express currency)
  • Order by spending volume
  • Added spending to bars and removed grids
  • In order of not losing information from original chart which had a total, added total spend on header (not visible in image).
@dimitrismistriotis
dimitrismistriotis / getJoinedArrayText.js
Last active January 8, 2016 10:54
getJoinedArrayText
/**
* Returns array join in a more natural language style by adding commas and
* having the last item prefixed with "and".
* Examples:
*
* getJoinedArrayText(['1'])
* "1"
* getJoinedArrayText(['1', '2'])
* "1 and 2"
* getJoinedArrayText(['1', '2', '3'])
#!/bin/zsh
#
# Inspired from
# http://stackoverflow.com/questions/3327312/drop-all-tables-in-postgresql
# and modified for heroku CLI.
#
if [[ $# -ne 1 ]]; then
echo "Supply heroku app as first argument" >&2
@dimitrismistriotis
dimitrismistriotis / Preferences.sublime-settings
Last active August 29, 2015 14:01
My sublime text preferences (they get overwritten when JSON doesn't parse)
{
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"font_size": 12,
"ignored_packages": ["Vintage", "Markdown"],
"rulers": [80, 100],
"soda_folder_icons": true,
"theme": "Soda Dark.sublime-theme",
"trim_trailing_white_space_on_save": true,
"tab_size": 2,
"translate_tabs_to_spaces": true