Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -e
function externalize_git {
if [ ! -d "$git_repos_repo_full_path" ]; then
mkdir -p "$git_repos_repo_full_path"
mv .git "${git_repos_repo_full_path}"/.git
git --git-dir="${git_repos_repo_full_path}/.git" --work-tree=. init && echo "gitdir: ${git_repos_repo_full_path}/.git" > .git
echo "Directory $git_repos_repo_full_path already exists!"


Bundler   1.15.0
Rubygems  2.6.10
Ruby      2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
GEM_HOME  /Users/viktorfonic/.rvm/gems/ruby-2.4.0
GEM_PATH  /Users/viktorfonic/.rvm/gems/ruby-2.4.0:/Users/viktorfonic/.rvm/gems/ruby-2.4.0@global
RVM       1.29.1 (latest)
Git       2.13.0
vfonic /
Created July 13, 2017 06:37
Script for uninstalling all rails gem dependencies for the given rails version
#!/bin/bash -e
gem uninstall railties rails actionmailer actioncable actionpack actionview activerecord activejob activemodel activesupport -v $1
vfonic / lazyimages.jsx
Last active September 13, 2018 12:18 — forked from saigowthamr/lazyimages
import React from 'react';
import moment from 'moment';
import LazyLoad from 'react-lazyload';
import './albums.css'
export default (props)=>{
function formatDate(date, format){
return moment(date).format(format);
def save
ActiveRecord::Base.transaction do
user = username) # user doesn't have to be instance var @user
add_errors(user.errors) unless user.persisted?
tweet = first_tweet, user_id:
add_errors(tweet.errors) unless tweet.persisted?
user.persisted? && tweet.persisted?
# db/migrate/add_signature_fields_to_delayed_jobs.rb
class AddFieldsToDelayedJobs < ActiveRecord::Migration
def change
add_column :delayed_jobs, :signature, :string
add_index :delayed_jobs, :signature
! name: APIdock downranker
! description: Lowers the rank of APIdock results
! public: true
! author: vfonic
! homepage:
! issues:
// ==UserScript==
// @name X mute the muted
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @match*
// @icon
// @grant none
// @require file:///Users/viktor/Developer/JavaScript/tampermonkey/xMuteTheMuted.js