View docker-compose.yml
version: "2.0" | |
services: | |
gitlab: | |
image: gitlab/gitlab-ce:12.10.3-ce.0 | |
container_name: gitlab | |
restart: always | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
external_url 'http://test.com' | |
ports: |
View datepicker.ts
import { Component, Input, OnInit, EventEmitter } from '@angular/core'; | |
var template = ` | |
<input type="date" [ngModel]="now | date:'yyyy-MM-dd'" (ngModelChange)="change($event)"> | |
` | |
@Component({ | |
selector: 'date-picker', | |
template: template, | |
outputs: ['dateChange'] |
View aes.go
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
"io" |
View windows-startup-shortcut.vbs
set WshShell = WScript.CreateObject("WScript.Shell" ) | |
Set FSO = CreateObject("Scripting.FileSystemObject") | |
strDesktop = WshShell.SpecialFolders("Startup" ) | |
set oShellLink = WshShell.CreateShortcut(strDesktop & "\AutoUpdate.lnk" ) | |
desktopDir = WshShell.SpecialFolders("Desktop") | |
oShellLink.TargetPath = FSO.BuildPath(desktopDir, "novel\AutoUpdate.exe") | |
oShellLink.WindowStyle = 1 | |
oShellLink.WorkingDirectory = FSO.BuildPath(desktopDir, "novel") | |
oShellLink.Save | |
Msgbox "Startup Success",0 |
View flex-layout.html
<html> | |
<head> | |
<style> | |
body{ | |
height: 100%; | |
background-color: gray; | |
padding: 0px; | |
margin: 0px; |
View random.go
const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456" | |
const ( | |
letterIdxBits = 6 // 6 bits to represent a letter index | |
letterIdxMask = 1<<letterIdxBits - 1 // All 1-bits, as many as letterIdxBits | |
letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits | |
) | |
var src = rand.NewSource(time.Now().UnixNano()) | |
func random(n int) string { |
View encrypt_file_pkcs5_pkcs7.go
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"errors" | |
"io" | |
"io/ioutil" |
View crypt.js
/*! | |
* Node.js script to encrypt and decrypt an arbitrary string using | |
* 128-bit AES method in CFB mode. | |
* | |
*/ | |
// A 16-byte key is required for a 128-bit encryption | |
var crypto = require('crypto'), | |
key = new Buffer('sixteen byte key'), | |
iv = crypto.randomBytes(16), |
View encrypt_file.go
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"fmt" | |
"io" | |
"io/ioutil" |
View index.go
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"mime/multipart" | |
"net/http" |
NewerOlder