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
apiVersion: v1
kind: Namespace
metadata:
name: httpbin
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
namespace: httpbin
@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

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:

#!/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
@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)'
@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 / 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,
javascript:(function () { if (!angular) { alert('Not a angular application or window.angular not found'); return; } var root = angular.element(document.getElementsByTagName('body')); var watchers = []; var f = function (element) { angular.forEach(['$scope', '$isolateScope'], function (scopeProperty) { if (element.data() && element.data().hasOwnProperty(scopeProperty)) { angular.forEach(element.data()[scopeProperty].$$watchers, function (watcher) { watchers.push(watcher); }); } }); angular.forEach(element.children(), function (childElement) { f(angular.element(childElement)); }); }; f(root); var watchersWithoutDuplicates = []; angular.forEach(watchers, function(item) { if(watchersWithoutDuplicates.indexOf(item) < 0) { watchersWithoutDuplicates.push(item); } }); alert('There is ' + watchersWithoutDuplicates.length + ' watcher
@davinkevin
davinkevin / restore.java
Created June 24, 2016 05:15
Method to restore database of H2 programmatically / in sql
@Transactional
public Boolean restore(String filename, TimeUnit timeUnit, Integer during) {
Path restoreFile = backup.getLocation().resolve(filename);
if (!Files.exists(restoreFile))
return Boolean.FALSE;
log.info("Full database reset");
em.createNativeQuery("DROP ALL OBJECTS;").executeUpdate();
.rating {
color: #a9a9a9;
margin: 0;
padding: 0;
}
ul.rating {
display: inline-block;
}