Skip to content

Instantly share code, notes, and snippets.

View vaskaloidis's full-sized avatar

Vas Kaloidis vaskaloidis

View GitHub Profile
@cmalven
cmalven / cheatsheet-layout-rendering-rails.md
Last active October 3, 2018 19:07
Cheat Sheet: Layouts and Rendering in Rails
@witt3rd
witt3rd / brew-sync.sh
Last active February 25, 2024 12:04 — forked from jpawlowski/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
#!/bin/bash
branch_name=$(git branch | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/")
echo "Removing old cordova directory"
rm -rf cordova
echo "Creating cordova app to ${branch_name}..."
echo "WARNING: say 'no' to the next prompts"
ember generate cordova-init "my.company.${branch_name}" --platform=android
@rbq
rbq / Gemfile
Last active April 27, 2020 13:48
Convert notes from Snippets.me to Quiver
source 'https://rubygems.org'
gem 'data_mapper'
gem 'dm-sqlite-adapter'
<%@page import="com.liferay.portal.kernel.dao.search.RowChecker"%>
<%@include file="/html/actions/init.jsp"%>
<%
PortletURL portletURL = renderResponse.createRenderURL();
String portletURLString = portletURL.toString();
StudentSearchContainer studentSearchContainer = new StudentSearchContainer(renderRequest, portletURL);
StudentDisplayTerms displayTerms = (StudentDisplayTerms)studentSearchContainer.getDisplayTerms();
<%@page import="com.liferay.portal.kernel.dao.search.RowChecker"%>
<%@include file="/html/actions/init.jsp"%>
<%
PortletURL portletURL = renderResponse.createRenderURL();
String portletURLString = portletURL.toString();
StudentSearchContainer studentSearchContainer = new StudentSearchContainer(renderRequest, portletURL);
StudentDisplayTerms displayTerms = (StudentDisplayTerms)studentSearchContainer.getDisplayTerms();
@emotality
emotality / duplicate_line_xcode.md
Last active January 24, 2025 13:49
Xcode - Duplicate Line key binding

NOTE (2022-07-09): Xcode finally added this functionality in Xcode 14, please see release notes here:

New Features in Xcode 14 Beta 3
When editing code, the Edit > Duplicate menu item and its corresponding keyboard shortcut now duplicate the selected text — or the line that currently contains the insertion point, if no text is selected. (8614499) (FB5618491)


Xcode line duplicate

Bind keys to duplicate lines in Xcode

@0632347878
0632347878 / Retina images
Created October 2, 2016 11:46
Specify two image paths and the @1x image dimensions, and Bootstrap will provide an @2x media query. If you have many images to serve, consider writing your retina image CSS manually in a single media query.
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
background-image: url("@{file-1x}");
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
@danidiaz
danidiaz / netrw.txt
Created October 7, 2016 20:57
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@brianshumate
brianshumate / docker-macos-terraform.md
Last active November 14, 2024 11:35
The Simplest Terraform with Docker on macOS

If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.