Skip to content

Instantly share code, notes, and snippets.

View vaskaloidis's full-sized avatar

Vas Kaloidis vaskaloidis

View GitHub Profile
@vaskaloidis
vaskaloidis / Default.sublime-commands
Created January 11, 2016 09:11
Sublime Text 3 commands for command-pallete config file + command-palleate commands for extensions (like Evernote). These can be used with Command-Line Sublime Text as "subl --commmand open_evernote_note"
[
{ "command": "send_to_evernote", "caption": "Evernote: Send to Evernote as new note" },
{ "command": "send_to_evernote", "args": {"clip": true}, "caption": "Evernote: Clip to Evernote as new note" },
{ "command": "open_evernote_note", "caption": "Evernote: Open Evernote Note" },
{ "command": "view_in_evernote_webapp", "caption": "Evernote: View Note in Web App" },
{ "command": "view_in_evernote_client", "caption": "Evernote: View Note in Evernote client" },
{ "command": "open_evernote_note", "args": {"by_searching": true}, "caption": "Evernote: Search Note" },
{ "command": "open_evernote_note", "args": {"max_notes": 10, "by_searching": "*", "order": "updated", "ascending": false}, "caption": "Evernote: List recent notes" },
{ "command": "attach_to_evernote_note", "caption": "Evernote: Attach current file to a note" },
{ "command": "insert_link_to_evernote_note", "caption": "Evernote: Insert link to a note (browse)" },
@vaskaloidis
vaskaloidis / gist:6265765
Created August 19, 2013 04:27
C++ Spinning Cube
#include GLUT/glut.h
#include iostream
#include stdlib.h
#include math.h
#include cmath
using namespace std;
class wcPt3D // class to represent a 2D point
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 / fparray.s
Last active October 7, 2022 17:51
Mips Single Precision Floating Point Unit (FPU) Array
.data
break: .asciiz "\n"
ask: .asciiz "Please enter a random 4 digit number for a seed: "
input: .float 4
list : .word 100
extension UIViewController {
func configureNavigationBar(largeTitleColor: UIColor, backgoundColor: UIColor, tintColor: UIColor, title: String, preferredLargeTitle: Bool) {
if #available(iOS 13.0, *) {
let navBarAppearance = UINavigationBarAppearance()
navBarAppearance.configureWithOpaqueBackground()
navBarAppearance.largeTitleTextAttributes = [.foregroundColor: largeTitleColor]
navBarAppearance.titleTextAttributes = [.foregroundColor: largeTitleColor]
navBarAppearance.backgroundColor = backgoundColor
navigationController?.navigationBar.standardAppearance = navBarAppearance
if Rails.env.development? || Rails.env.test?
puts 'Deleting Line Items, Orders and Products'
LineItem.delete_all
Order.delete_all
Product.delete_all
else
puts 'NOT DELETING LINE-ITEMS, ORDERS, and PRODUCTS'
end
@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/
if Rails.const_defined? 'Server'
options = { addr: ENV.fetch('PORT') { 3000 } }
puts 'Starting Ngrok'
Ngrok::Tunnel.start(options)
puts '[NGROK] tunneling at ' + Ngrok::Tunnel.ngrok_url_https
config.hosts << Ngrok::Tunnel.ngrok_url_https
ENV['api_return_url_base'] = Ngrok::Tunnel.ngrok_url_https
puts "[Ngrok] ENV VARIABLE api_return_url_base: #{ENV["api_return_url_base"]}"
@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).