Skip to content

Instantly share code, notes, and snippets.

View edipofederle's full-sized avatar
🏠
Working from home

Édipo Féderle edipofederle

🏠
Working from home
View GitHub Profile
Configuration.all.each do |configuration|
begin
User.find(configuration.user_id)
rescue
user_id = configuration.user_id
Configuration.where(user_id: user_id).delete_all
Client.where(user_id: user_id).delete_all
Order.where(user_id: user_id).delete_all
Product.where(user_id: user_id).delete_all
Topmail.where(user_id: user_id).delete_all
>> result = ClientIndex.filter {company_id == 2364}.limit(2)
=> #<Chewy::Query:0x0000010648a920 @options={}, @index=ClientIndex, @types=["person_client"], @criteria=#<Chewy::Query::Criteria:0x0000010648a8a8 @options={:query_mode=>:must, :filter_mode=>:and, :post_filter_mode=>:and}, @queries=[], @filters=[{:term=>{"company_id"=>2364}}], @post_filters=[], @sort=[], @fields=[], @types=[], @scores=[], @request_options={:size=>2}, @facets={}, @aggregations={}, @suggest={}>, @_request=nil, @_response=nil, @_results=nil, @_collection=nil>
>> result.map {|c| c.name }
ClientIndex Search (8.1ms) {:body=>{:query=>{:filtered=>{:query=>{:match_all=>{}}, :filter=>{:term=>{"company_id"=>2364}}}}, :size=>2}, :index=>"client", :type=>["person_client"]}
=> ["teste 5", "teste 1"]
>> search = result.filter {name == "ana"}
=> #<Chewy::Query:0x00000106462b50 @options={}, @index=ClientIndex, @types=["person_client"], @criteria=#<Chewy::Query::Criteria:0x00000106462ab0 @options={:query_mode=>:must, :filter_mode=>:and, :post_filt
Information:Gradle tasks [:android.main:assembleDebug]
skummet jar detected!
Error:A problem occurred configuring project ':android.main'.
> Could not resolve all dependencies for configuration ':android.main:_debugCompile'.
> Could not find any version that matches me.sneer:crypto:+.
Searched in the following locations:
https://jcenter.bintray.com/me/sneer/crypto/maven-metadata.xml
https://jcenter.bintray.com/me/sneer/crypto/
file:/Users/elf/workspace/sneer/skummet-artifacts/me.sneer/crypto/
file:/Users/elf/Library/Android/sdk/extras/android/m2repository/me/sneer/crypto/maven-metadata.xml

Tapahtuma

Simple event system for your Software.

Includes:

  1. a Server which will receive your events
  2. the server talk to a MongoDB (only for now) for persistence
  3. The communication takes place through a TCP client. (Ruby, Java and Clojure, for now). The data is by default (and only for now), using extensible data notation (EDN).
var React = require('react-native');
buttonClean: {
height: 36,
flex: 3,
flexDirection: 'row',
backgroundColor: '#48BBEC',
borderColor: '#48BBEC',
borderWidth: 1,
borderRadius: 8,
marginBottom: 1,
alignSelf: 'stretch',
<TouchableHighlight style={styles.buttonClean} underlayColor='#99d9f4'>
<Text style={styles.buttonText}
onPress={this.cleanAll.bind(this)}>Clean All</Text>
</TouchableHighlight>
this.setState({ isLoading: true , quote: '' });
var loading = this.state.isLoading ? ( <ActivityIndicatorIOS hidden='true' size='large'/> ) : ( <View/>);