This file contains hidden or 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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'rails', '5.1.1' # use correct rails version |
This file contains hidden or 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
# Customized dotfiles. Original credits: | |
# Shell prompt based on the Solarized Dark theme. | |
# Screenshot: http://i.imgur.com/EkEtphC.png | |
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles | |
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM='gnome-256color'; | |
elif infocmp xterm-256color >/dev/null 2>&1; then |
This file contains hidden or 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
// Based on http://www.tallior.com/find-missing-references-unity/ | |
// It fixes deprecations and checks for missing references every time a new scene is loaded | |
// Moreover, it inspects missing references in animators and animation frames | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
using System.Linq; | |
[InitializeOnLoad] |
This file contains hidden or 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
// Copyright (c) 2022 Piero Dotti, Elf Games | |
// | |
// Permission is hereby granted, free of charge, to any person | |
// obtaining a copy of this software and associated documentation | |
// files (the "Software"), to deal in the Software without | |
// restriction, including without limitation the rights to use, | |
// copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the | |
// Software is furnished to do so, subject to the following | |
// conditions: |
This file contains hidden or 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
public class MyBehavior : MonoBehaviour { | |
// This will store the string value | |
[StringInList("Cat", "Dog")] public string Animal; | |
// This will store the index of the array value | |
[StringInList("John", "Jack", "Jim")] public int PersonID; | |
// Showing a list of loaded scenes | |
[StringInList(typeof(PropertyDrawersHelper), "AllSceneNames")] public string SceneName; | |
} |
This file contains hidden or 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
Neo4j::ActiveBase.current_session.adaptor.logger.level = Logger::DEBUG | |
Neo4j::Core::CypherSession::Adaptors::Base.subscribe_to_query(&method(:puts)) | |
Neo4j::Core::CypherSession::Adaptors::HTTP.subscribe_to_request(&method(:puts)) | |
Neo4j::Core::CypherSession::Adaptors::Embedded.subscribe_to_transaction(&method(:puts)) |
This file contains hidden or 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
using System; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
public class DraggablePoint : PropertyAttribute {} | |
#if UNITY_EDITOR |
This file contains hidden or 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
# Running this query in neo4j 8.0 using bolt, breaks the current session: | |
Neo4j::ActiveBase.current_session.query("CREATE (n:`Version`:`Quotable`) SET n = {props} RETURN n", {:props=>{:uuid=>"547240ab-50ef-4c3a-9a39-056c697498d0", :created_at=>1474040467, :updated_at=>1474040467, :title=>"Indus OS Raises $5M To Make Android Work For First-Time Smartphone Users In India", :abstract=>"If you want proof that Android is the operating system of emerging markets, look no further than Indus OS. The company, formerly known as Firstouch, is tweaking the Google-run operating system to the unique demands and culture of India. And it's raised $5 million in fresh funding to push on with its lofty target of reaching one billion emerging market users.", :content=>"\n<p data-uuid=\"9a7cd60f-e203-4ed9-a0f3-5538701bcd6c\"><img src=\"https://tctechcrunch2011.files.wordpress.com/2016/01/india-phone.jpg?w=738\"></p><p data-uuid=\"58ada0fb-c007-4714-b5bf-2422f542ae9f\">If you want proof that Android is the operating system of emer |
This file contains hidden or 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
#!/usr/bin/env bash | |
origin_raw_folder="raw_images" | |
rm -rf images | |
mkdir -p images/iphone | |
mkdir -p images/android/res-hdpi | |
mkdir -p images/android/res-hdpi | |
mkdir -p images/android/res-xhdpi | |
mkdir -p images/android/res-xxhdpi |
This file contains hidden or 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
class Tree | |
attr_reader :data | |
def initialize(data) | |
@data = data | |
end | |
def +(other) | |
Tree.new(deep_merge(@data, other.is_a?(Tree) ? other.data : other)) | |
end |