View docker-compose.yml
This file contains 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
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
This file contains 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 { 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
This file contains 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 main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
"io" |
View windows-startup-shortcut.vbs
This file contains 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
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
This file contains 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
<html> | |
<head> | |
<style> | |
body{ | |
height: 100%; | |
background-color: gray; | |
padding: 0px; | |
margin: 0px; |
View random.go
This file contains 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
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
This file contains 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 main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"errors" | |
"io" | |
"io/ioutil" |
View crypt.js
This file contains 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
/*! | |
* 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
This file contains 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 main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"fmt" | |
"io" | |
"io/ioutil" |
View index.go
This file contains 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 main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"mime/multipart" | |
"net/http" |
NewerOlder