Skip to content

Instantly share code, notes, and snippets.

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))
public List<Order> findOrders(User customer, User seller) {
}
@DmitryVarennikov
DmitryVarennikov / BackupAgent
Created February 11, 2016 16:56
BackupAgent for Android Backup Service
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;
```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 {
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;
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;
@DmitryVarennikov
DmitryVarennikov / gist:259156e18b2ac5660dc2
Created October 2, 2014 18:11
Custom app initializer
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 {
@DmitryVarennikov
DmitryVarennikov / gist:aa5d42c5c8a7b3f4b947
Created September 29, 2014 22:19
ERR:USER_PROFILE:NOT_FOUND
Array
(
[REQ_CMD] => APP:NOTIFICATION:CREATE?v=2
[REQ] => Array
(
[app_id] => 351059269371559937
[sender_profile_id] => WITKIT
[recipient_profile_ids] => Array
(
[0] => 287753659528249345
[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
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>