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
| require 'drb/drb' | |
| require 'pp' | |
| obj = DRbObject.new_with_uri('druby://localhost:1234') | |
| pp obj | |
| pp obj.to_a | |
| pp obj.to_single |
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
| sudo apt-get install libsnappy-dev | |
| wget https://leveldb.googlecode.com/files/leveldb-1.9.0.tar.gz | |
| tar -xzf leveldb-1.9.0.tar.gz | |
| cd leveldb-1.9.0 | |
| make | |
| sudo mv libleveldb.* /usr/local/lib | |
| cd include | |
| sudo cp -R leveldb /usr/local/include |
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
| defmodule Recurse do | |
| def loopy([head | tail]) do | |
| IO.puts "Head: #{head} Tail: #{inspect(tail)}" | |
| loopy(tail) | |
| end | |
| def loopy([]), do: IO.puts "Done!" | |
| end |
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
| reduce(lambda x,y: y + x, "abcde") |
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
| from matplotlib import pyplot as plt | |
| years = [1950, 1960, 1970, 1980, 1990, 2000, 2010] | |
| gdp = [300.2, 543.3, 1075.9, 2862.5, 5979.6, 10289.7, 14958.3] | |
| plt.plot(years, gdp, color='green', marker='o', linestyle='solid') | |
| plt.title("Nominal GDP") | |
| plt.ylabel("Billions of $") |
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 AppConfig extends WebMvcConfigurerAdapter{ | |
| @Bean | |
| public MessageSource messageSource() { | |
| ReloadableResourceBundleMessageSource bean = new ReloadableResourceBundleMessageSource(); | |
| bean.setBasename("classpath:messages"); | |
| bean.setDefaultEncoding("UTF-8"); | |
| return bean; | |
| } | |
| @Bean |
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
| watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache |
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
| import App from './app/index'; | |
| import CodePush from 'react-native-code-push'; | |
| const app = CodePush({ | |
| installMode: CodePush.InstallMode.IMMEDIATE, | |
| updateDialog: true | |
| })(App); |
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
| { | |
| "name": "react-app", | |
| "version": "0.1.0", | |
| "private": true, | |
| "dependencies": { | |
| "react": "^16.2.0", | |
| "react-dom": "^16.2.0", | |
| "react-scripts": "1.1.1" | |
| }, | |
| "scripts": { |
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
| Process.register(self, :some_name) | |
| send(:some_name, :msg) | |
| receive do | |
| msg -> IO.puts "received #{msg}" | |
| end |