Skip to content

Instantly share code, notes, and snippets.

View davinkevin's full-sized avatar
👋
Working hard !

Davin Kevin davinkevin

👋
Working hard !
View GitHub Profile
@davinkevin
davinkevin / MultipartFileSender
Created February 10, 2015 16:31
Implementing HTTP byte-range requests in Spring 4 and other framework...
package lan.dk.podcastserver.utils.multipart;
import lan.dk.podcastserver.utils.MimeTypeUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
apiVersion: v1
kind: Namespace
metadata:
name: httpbin
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
namespace: httpbin
@davinkevin
davinkevin / DatabaseConfiguraitonTest.java
Created September 5, 2015 11:04
Init of Repository Test
package lan.dk.podcastserver.repository;
import com.ninja_squad.dbsetup.operation.Operation;
import org.hibernate.search.jpa.FullTextEntityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
@davinkevin
davinkevin / error.js
Created July 10, 2016 10:48
Error generated by vget parsing function
This file has been truncated, but you can view the full file.
var _yt_player={};(function(g){var window=this;var h,p,q,r,ca,da,ea,fa,v,ga,ha,ia,ka,na,oa,pa,w,qa,ra,y,sa,va,wa,A,xa,ya,Ga,Ka,Ha,Ia,Ma,Na,Pa,B,Qa,Ra,Ua,Ta,Va,Xa,Ya,Za,$a,ab,bb,db,fb,eb,ib,gb,kb,lb,nb,ob,qb,pb,rb,sb,tb,ub,wb,vb,xb,Ab,Bb,yb,Cb,Db,Eb,Gb,zb,Fb,Hb,Ib,Jb,Kb,Lb,Mb,E,F,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub,Vb,Xb,Yb,Zb,$b,ac,Wb,bc,cc,dc,ec,fc,gc,hc,ic,jc,lc,mc,oc,pc,qc,sc,tc,uc,vc,yc,Ac,Dc,Ec,Gc,Jc,Kc,Lc,Nc,Oc,Pc,Qc,Mc,Rc,Tc,Wc,ad,bd,cd,Xc,fd,ed,Zc,Uc,Sc,I,hd,id,jd,kd,ld,md,pd,od,qd,rd,xd,td,yd,zd,Ad,Cd,Dd,Fd,Gd,Hd,Jd,Kd,Md,Od,Pd,Td,Nd,Bd,Id,Wd,Sd,
@davinkevin
davinkevin / s3.tf
Last active February 5, 2020 13:22
test terraform
# Test de comment !
# Sur plusieurs ligne 👍
resource "aws_s3_bucket" "my-bucket-example" {
bucket = "my-bucket-example-23413426676567"
acl = "public-read"
}
resource "aws_s3_bucket_object" "picture-of-cat" {
bucket = aws_s3_bucket.my-bucket-example.id
@davinkevin
davinkevin / ng.fish
Created October 19, 2016 05:27
angular-cli autocomplete
# ng help
complete -f -c ng -n '__fish_use_subcommand' -a help -d 'Outputs the usage instructions for all commands or the provided command.'
# ng version
complete -f -c ng -n '__fish_use_subcommand' -a version -d 'Outputs angular-cli version.'
complete -f -A -c ng -n '__fish_seen_subcommand_from version' -l verbose -d 'verbose (Boolean) (Default: false)'

Keybase proof

I hereby claim:

  • I am davinkevin on github.
  • I am davinkevin (https://keybase.io/davinkevin) on keybase.
  • I have a public key whose fingerprint is 644E B07F A148 89FB 4770 1A70 7DEB EEB4 3ED5 B589

To claim this, I am signing this object:

@davinkevin
davinkevin / ffprobe.help.txt
Created July 25, 2016 02:37
ffprobe.help.txt
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] [INPUT_FILE]
Main options:
-L show license
-h topic show help
-? topic show help
-help topic show help
--help topic show help
-version show version
@davinkevin
davinkevin / viewControllersInConfig
Created May 15, 2015 22:47
SpringConfiguration to catch all not already defined route
@Configuration
@ComponentScan("lan.dk.podcastserver.controller")
public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("index.html"); // Same thing without this line
registry.addViewController("/**").setViewName("index.html");
super.addViewControllers(registry); // and this line...
}
#!/bin/sh
### BEGIN INIT INFO
# Provides: regenerate_ssh_host_keys
# Required-Start:
# Required-Stop:
# Default-Start: 2
# Default-Stop:
# Short-Description: Regenerate ssh host keys
# Description:
### END INIT INFO