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
| 'use strict'; | |
| /*jshint node:true */ | |
| // npm install lodash colors minimist request sync-request | |
| var _ = require('lodash'), | |
| colours = require('colors/safe'), | |
| parseArgs = require('minimist'), | |
| request = require('request'), | |
| requestSync = require('sync-request'), |
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 static class IncludeRawJsonDeserializer extends JsonDeserializer implements ContextualDeserializer { | |
| private JavaType type; | |
| private JsonDeserializer deserializer; | |
| private final TokenBufferDeserializer tokenBufferDeserializer; | |
| public IncludeRawJsonDeserializer() { | |
| tokenBufferDeserializer = new TokenBufferDeserializer(); | |
| } |
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
| //----------------------------- MISC -------------------------------\\ | |
| //------------------------------------------------------------------\\ | |
| sv_cheats "1" | |
| sv_showimpacts "0" | |
| sv_showimpacts_time "2.5" | |
| //---------------------------- BINDS -------------------------------\\ | |
| //------------------------------------------------------------------\\ | |
| bind "SPACE" "demo_togglepause" // pause/play demo | |
| bind "c" "r_cleardecals" // get rid of bulletholes and black residue from grenade explosions |
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
| TOPICS=$(./bin/kafka-topics.sh --zookeeper zookeeper.intranet:2181 --list) | |
| for i in $TOPICS ;do | |
| echo "move to end $i" | |
| ./bin/kafka-consumer-groups.sh --bootstrap-server zookeeper.intranet:9092 --execute --reset-offsets --to-latest --group mg-mining --topic $i | |
| done |
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 org.apache.commons.lang3.reflect.FieldUtils; | |
| import java.util.Random; | |
| import java.util.concurrent.atomic.AtomicLong; | |
| public class InvRand { | |
| static final String SEED_FIELD = "seed"; | |
| public static void main(String[] args) throws IllegalAccessException { |
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
| #!/bin/bash | |
| set -e | |
| PUBLIC_KEY='tacape.mageddo.com.pub' | |
| for i in $(cat /tmp/servers.txt); do | |
| sudo cp "$HOME/.ssh/$PUBLIC_KEY" /tmp | |
| echo "Installing ssh key in server: $i" | |
| # rsync -ave ssh "~/.ssh/$PUBLIC_KEY" "root@$i:~/.ssh/" |
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 java.sql.Date; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.sql.Timestamp; | |
| import java.sql.Types; | |
| import java.time.LocalDate; | |
| import java.time.LocalDateTime; | |
| import java.util.Optional; |
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 com.fasterxml.jackson.core.JsonGenerator; | |
| import com.fasterxml.jackson.core.JsonParser; | |
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.core.JsonToken; | |
| import com.fasterxml.jackson.databind.DeserializationContext; | |
| import com.fasterxml.jackson.databind.JsonDeserializer; | |
| import com.fasterxml.jackson.databind.JsonSerializer; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.fasterxml.jackson.databind.SerializerProvider; | |
| import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
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 CepCrawlerDAORestTest { | |
| @ClassRule | |
| public static final InMemoryRestServer server = new InMemoryRestServer(CepSearchProxy.class); | |
| @Path("/") | |
| public static class CepSearchProxy { | |
| @Path(CepCrawlerDAORest.CEP_SEARCH) | |
| @GET |
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
| package org.apache.spark.examples.streaming; | |
| import com.google.common.io.Closeables; | |
| import org.apache.spark.SparkConf; | |
| import org.apache.spark.storage.StorageLevel; | |
| import org.apache.spark.streaming.Duration; | |
| import org.apache.spark.streaming.api.java.JavaDStream; | |
| import org.apache.spark.streaming.api.java.JavaPairDStream; | |
| import org.apache.spark.streaming.api.java.JavaReceiverInputDStream; |