Skip to content

Instantly share code, notes, and snippets.

View punkmonday's full-sized avatar

fff punkmonday

View GitHub Profile
@punkmonday
punkmonday / .vsvimrc
Last active September 7, 2023 06:03
visual studio 2022 config
set ai
"自动缩进宽度
set sw=4
set ts=4
"关闭高亮显示
set nohlsearch
set is
set ignorecase
set smartcase
@punkmonday
punkmonday / .ideavimrc
Last active August 22, 2023 12:33
my .ideavimrc
"" Source your .vimrc
"source ~/.vimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set number relativenumber
set idearefactormode=keep
set ideajoin
set surround
@entrofi
entrofi / GerritDockerFile
Created September 26, 2017 06:13
Simple Basic Ubuntu Based Gerrit Docker File
FROM ubuntu:16.04
LABEL "author"="Hasan Comak"
ENV GERRIT_VERSION="2.13.9"
ENV GERRIT_RELEASE=1
ENV GERRIT_HOME /var/gerrit
ENV GERRIT_SITE ${GERRIT_HOME}/review_site
import org.apache.kafka.common.serialization.StringDeserializer
import org.apache.spark.SparkConf
import org.apache.spark.streaming.{Seconds, StreamingContext}
import org.apache.spark.streaming.kafka010._
import org.apache.spark.streaming.kafka010.LocationStrategies.PreferConsistent
import org.apache.spark.streaming.kafka010.ConsumerStrategies.Subscribe
/**
* Consumes messages from one or more topics in Kafka and does wordcount.
* export SPARK_KAFKA_VERSION=0.10
@hustcat
hustcat / spark_compile_debug_errors.md
Last active November 18, 2021 13:04
spark编译调试错误
  • 运行exmaple中示例错误1:
Exception in thread "main" org.apache.spark.SparkException: A master URL must be set in your configuration

VM options启动参数增加:

-Dspark.master=local
@DaHoC
DaHoC / PfPicklistConverter.java
Last active February 15, 2018 12:37
Primefaces Picklist converter
import org.primefaces.component.picklist.PickList;
import org.primefaces.model.DualListModel;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import java.util.List;
import java.util.Objects;
/**
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 09:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

package com.ypg.liferay.portlet;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.liferay.counter.service.CounterLocalServiceUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.service.UserLocalServiceUtil;
@RunWith(Arquillian.class)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!-- Generated by RHY @will_awoke -->
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
@aburok
aburok / _vsvimrc
Last active August 22, 2023 05:57
Visual Studio VsVim configuration file
" Ctrl + Alt + I - ReSharper generate file beside
" Ctrl + Alt + S - Resharper surrand with template
" File {{{
nmap zX :vsc Edit.UndoClose<CR>
nnoremap Q :vsc File.SaveSelectedItems<CR> :vsc File.Close<CR>
" }}}
" Build {{{