Skip to content

Instantly share code, notes, and snippets.

View vaskaloidis's full-sized avatar

Vas Kaloidis vaskaloidis

View GitHub Profile
import UIKit
import PlaygroundSupport
struct StringConstants {
static let bullet1 = "This is a small string."
static let bullet2 = "This is more of medium string with a few more words etc."
static let bullet3 = "Well this is certainly a longer string, with many more words than either of the previuos two strings."
}
typealias ParagraphData = (bullet: String, paragraph: String)
@vaskaloidis
vaskaloidis / duplicate_line_xcode.md
Created January 13, 2021 18:55 — forked from emotality/duplicate_line_xcode.md
Xcode - Duplicate Line key binding

Xcode line duplicate

Bind keys to duplicate lines in Xcode

  1. Open below directory in Finder with Cmnd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
@vaskaloidis
vaskaloidis / awk_reference.sh
Last active April 15, 2020 03:04 — forked from Rafe/gist:3102414
AWK cheatsheet
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008
USAGE:
Unix: awk '/pattern/ {print "$1"}' # standard Unix shells
DOS/Win: awk '/pattern/ {print "$1"}' # compiled with DJGPP, Cygwin
awk "/pattern/ {print \"$1\"}" # GnuWin32, UnxUtils, Mingw
# FILE SPACING:

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@vaskaloidis
vaskaloidis / rails-app-generator-example.rb
Created May 27, 2018 04:23 — forked from andrewle/clever-rails.rb
A Rails app generator tuned my common needs
#!/usr/bin/env ruby
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
require "active_support/core_ext/string/strip"
class CleverAppGenerator < Rails::Generators::AppGenerator
class_option :skip_bundle, default: true
class_option :database, default: "postgresql"
class_option :skip_test_unit, default: true, hide: true
@vaskaloidis
vaskaloidis / 0_reuse_code.js
Created January 22, 2017 09:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console