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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name X mute the muted | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://twitter.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=x.com | |
// @grant none | |
// @require file:///Users/viktor/Developer/JavaScript/tampermonkey/xMuteTheMuted.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! name: APIdock downranker | |
! description: Lowers the rank of APIdock results | |
! public: true | |
! author: vfonic | |
! homepage: https://gist.github.com/vfonic/62a4d8d3625abd1067521d1b7c0ff8f7 | |
! issues: https://gist.github.com/vfonic/62a4d8d3625abd1067521d1b7c0ff8f7 | |
$discard,site=apidock.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def save | |
ActiveRecord::Base.transaction do | |
user = User.save(username: username) # user doesn't have to be instance var @user | |
add_errors(user.errors) unless user.persisted? | |
tweet = Tweet.save(body: first_tweet, user_id: user.id) | |
add_errors(tweet.errors) unless tweet.persisted? | |
user.persisted? && tweet.persisted? | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
gem uninstall railties rails actionmailer actioncable actionpack actionview activerecord activejob activemodel activesupport -v $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
else | |
echo "Directory $git_repos_repo_full_path already exists!" | |
fi |