Skip to content

Instantly share code, notes, and snippets.

View cguldogan's full-sized avatar
💭
😼 This is the way

Can GULDOGAN cguldogan

💭
😼 This is the way
View GitHub Profile
@cguldogan
cguldogan / QueryFilters.cs
Created February 2, 2022 23:57
C# Query Filter Scaffold
namespace SampleProject.QueryFilters
{
public class QueryFilter
{
public Sorting Sorting { get; set; }
public Pagination Pagination { get; set; }
public List<Filter> Filters { get; set; }
}
public class Sorting
@cguldogan
cguldogan / gist:0b54750483bddfa8ce141c2810a723c3
Created March 31, 2021 14:03
OpenSSL Self Signed Certificate as base64
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 825 -out certificate.pem
openssl x509 -text -noout -in certificate.pem
openssl pkcs12 -inkey key.pem -in certificate.pem -export -out certificate.p12
openssl pkcs12 -in certificate.p12 -noout -info
openssl base64 -in certificate.p12 -A -out certificate.base64
@cguldogan
cguldogan / docker-compose.yml
Created August 4, 2020 08:28
secure elasticsearch
version: '3.4'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
container_name: elasticsearch
environment:
- "discovery.type=single-node"
- xpack.security.enabled=true
ports:
@cguldogan
cguldogan / Ubuntu_Docker.md
Last active August 25, 2018 02:42
Initial Ubuntu Linux Docker Image Installation Commands for Go
  • apt update

  • apt -y install curl

  • apt install wget git

  • apt install golang

  • go version

@cguldogan
cguldogan / hyper.js
Created May 1, 2018 10:24 — forked from coco-napky/hyper.js
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@cguldogan
cguldogan / gitBashInVsCode.txt
Created April 11, 2018 10:02
VSCode settings for git bash
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
@cguldogan
cguldogan / cleanGitRepo.txt
Last active March 2, 2018 16:08
Clean Git Repo
git ls-files --ignored --exclude-standard -z | xargs -0 git rm --cached
git commit -am "Remove ignored files"
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
@cguldogan
cguldogan / objectToJson.cs
Created February 27, 2018 14:49
Object To JSON C#
var myObjectAsJsonStringInCSharp = Newtonsoft.Json.JsonConvert.SerializeObject(myObj);
@cguldogan
cguldogan / downloadBase64BlobFile.js
Created November 24, 2017 10:31
Download base 64 to blob file
function downloadBase64BlobFile(response) {
var blob = b64toBlob(response.data, 'application/vnd.ms-excel');
if (blob != null && navigator.msSaveBlob) {
return navigator.msSaveBlob(blob, response.fileName);
}
var a = $('<a style=\'display: none;\'/>');
var url = window.URL.createObjectURL(new Blob([blob], {
type: 'application/vnd.ms-excel',