Skip to content

Instantly share code, notes, and snippets.

dV dVaffection

Block or report user

Report or block dVaffection

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Coffee check
javascript:(setInterval(function() {
console.log('Running check');
[].forEach.call(document.getElementById('vue-router').children, function(el) {
if (el.firstChild.innerHTML == 'Dmitry' && el.className != 'pending') {
alert('Coffee time!');
}
});
}, 5000))
View Variables naming in context
public List<Order> findOrders(User customer, User seller) {
}
@dVaffection
dVaffection / BackupAgent
Created Feb 11, 2016
BackupAgent for Android Backup Service
View BackupAgent
package com.dvlab.birthdaynotes.services;
import android.app.backup.BackupDataInput;
import android.app.backup.BackupDataOutput;
import android.os.ParcelFileDescriptor;
import android.util.Log;
import com.dvlab.birthdaynotes.entities.Person;
import com.dvlab.birthdaynotes.repositories.PeopleRepo;
View Error handling in PromiseKit example
```swift
UIApplication.sharedApplication().networkActivityIndicatorVisible = true
when(getQuestions(session.id, date: date), getAnswers(session.id, date: date)).then {
(questions: [SessionQuestion], answers: [SessionAnswer]) -> Void in
self.sessionQuestions = questions
self.sessionAnswers = answers
self.tableView.reloadData()
}.always {
View WebConfig.java
package cuenation.api;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.ShallowEtagHeaderFilter;
import javax.servlet.DispatcherType;
import java.util.EnumSet;
View gist:9c75855adec931be999b
package cuenation.api;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.data.web.config.EnableSpringDataWebSupport;
import org.springframework.web.filter.ShallowEtagHeaderFilter;
View gist:259156e18b2ac5660dc2
package cuenation.api;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.filter.ShallowEtagHeaderFilter;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
public class AppInitializer implements WebApplicationInitializer {
View gist:aa5d42c5c8a7b3f4b947
Array
(
[REQ_CMD] => APP:NOTIFICATION:CREATE?v=2
[REQ] => Array
(
[app_id] => 351059269371559937
[sender_profile_id] => WITKIT
[recipient_profile_ids] => Array
(
[0] => 287753659528249345
View gist:b49df2fd16f123fed224
[2014-09-26 00:26:31] myapp.DEBUG: a:2:{s:7:"REQ_CMD";s:27:"APP:NOTIFICATION:CREATE?v=2";s:3:"REQ";a:7:{s:6:"app_id";s:18:"351059269371559937";s:17:"sender_profile_id";s:18:"287753659528249345";s:21:"recipient_profile_ids";a:1:{i:0;s:18:"287753659528249345";}s:4:"data";a:2:{s:7:"project";a:11:{s:2:"id";s:24:"53fd7357a6e4d06238000017";s:6:"app_id";s:18:"351059269371559937";s:10:"profile_id";s:18:"287753659528249345";s:5:"title";s:13:"Play Football";s:4:"desc";s:0:"";s:5:"types";a:3:{i:0;a:2:{s:2:"id";s:24:"53fd7357a6e4d06238000011";s:4:"name";s:3:"Bug";}i:1;a:2:{s:2:"id";s:24:"53fd7357a6e4d06238000012";s:4:"name";s:11:"New Feature";}i:2;a:2:{s:2:"id";s:24:"53fd7357a6e4d06238000013";s:4:"name";s:4:"Task";}}s:7:"members";a:1:{i:0;a:2:{s:10:"profile_id";s:18:"287753659528249345";s:4:"role";s:13:"project_owner";}}s:6:"states";a:3:{i:0;a:4:{s:2:"id";s:24:"53fd7357a6e4d0623800000e";s:4:"name";s:5:"To Do";s:5:"order";s:1:"1";s:8:"hallmark";N;}i:1;a:4:{s:2:"id";s:24:"53fd7357a6e4d0623800000f";s:4:"name";s:11:"In Progr
View gist:028c3ed82a8632754129
141{
142 REQ_CMD: "APP:CMD"
143 REQ:
144 {
145 app_id*: <string>
146 profile_id*: <string>
147 cmd: "POST:TOP_LEVEL_COMMENTS:GET"
148 params:
149 {
150 entity_id*: <string>
You can’t perform that action at this time.