Skip to content

Instantly share code, notes, and snippets.

Romanos Tsouroplis romdim

Block or report user

Report or block romdim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@romdim
romdim / 8tracks-dl.sh
Last active Feb 8, 2018
8tracks playlist songs downloader using youtube-dl and bash script magic
View 8tracks-dl.sh
#!/bin/bash
# Curl the url, get 1-line that contains the mix id, keep only that, remove prefixes and suffixes, add the json url we need for getting the tracklist
url=$(curl https://8tracks.com/$1 | grep embedUrl | awk {'print $3'} | sed -e 's#content="##g' -e 's#player_v3_universal/autoplay"##g' | sed 's/$/tracks_for_international.jsonh/')
# Curl the url that contains tracklist
tracks=$(curl $url)
# Get number of tracks
count=$(echo $tracks | jq '.tracks | length - 1')
# For all tracks download each one
for i in $(seq 0 $count)
do
@romdim
romdim / .env
Last active Jan 7, 2018
Files for dockerizing and .env new Rails App
View .env
# Rails secret
SECRET_KEY_BASE=NEW_SECRET
DB_POOL=10
DATABASE_URL=postgres://CHANGE_ME:CHANGE_ME123@db/CHANGE_ME_dev
# Puma port
PORT=3000
# Rails outputs to console if this env exists
View .secrets.yaml.tpl
apiVersion: v1
kind: Secret
metadata:
name: drone-secrets
type: Opaque
data:
server.secret: REPLACE-THIS-WITH-BASE64-ENCODED-VALUE
View database.yml
defaults: &defaults
adapter: postgresql
encoding: unicode
pool: 5
reconnect: true
development:
<<: *defaults
url: <% ENV['DATABASE_URL'] %>
@romdim
romdim / datepicker.coffee
Last active Oct 5, 2018 — forked from kdimatteo/datepicker.js
Backbone-Forms implementation of Bootstrap DatePicker
View datepicker.coffee
###*
# Bootstrap Datepicker for Backbone.Forms
#
# Quick editor to create a Bootstrap style datepicker (instead of multiple of dropdowns)
# @see: https://github.com/eternicode/bootstrap-datepicker/
# @usage: takes 5 optional schema options: format, minViewMode, autoclose, clearBtn and endDate
# Forked because I wanted to use only years as shown in the example below
schema:
MyDate:
type: "DatePicker"
@romdim
romdim / Restart sqllocaldb - update db
Created Mar 11, 2015
Stop and restart Local SQL DB and do update
View Restart sqllocaldb - update db
sqllocaldb.exe stop v11.0
sqllocaldb.exe delete v11.0
Update-Database
@romdim
romdim / add-migration
Created Mar 11, 2015
Enable Migrations, Add Init, Update DB
View add-migration
Enable-Migrations –EnableAutomaticMigrations
Add-Migration Init
Update-Database
@romdim
romdim / git fix gitignore cache issues
Created Mar 11, 2015
git fix gitignore cache issues
View git fix gitignore cache issues
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
You can’t perform that action at this time.