Skip to content

Instantly share code, notes, and snippets.

View piraces's full-sized avatar
Developing

Raúl Piracés Alastuey piraces

Developing
View GitHub Profile
@pksunkara
pksunkara / config
Last active July 25, 2024 15:53
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@davidfowl
davidfowl / dotnetlayout.md
Last active July 26, 2024 16:58
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@ravibhure
ravibhure / git_rebase.md
Last active July 26, 2024 08:21
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@Stadicus
Stadicus / setup_clightning.md
Last active December 29, 2022 11:41
Setup c-lightning on Digital Ocean

E-Commerce c-lightning node on Digital Ocean

Prerequisites

  • based on small Digital Ocean VPS (1CPU / 1GB RAM) with Ubuntu 16.04
  • SSH keys are recommended, but not described here
  • (sub) domain name necessary for SSL certificate

UFW & basic stuff

Login as "root"

// This file is based on the code from the ASP.NET Core repository
// https://github.com/aspnet/AspNetCore/tree/master/src/Middleware/SpaServices.Extensions/src
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
@saggie
saggie / Verify_Cognito_JWT_in_Ktor.md
Created August 22, 2021 06:18
Verify Amazon Cognito JWT in Ktor

(In Ktor: 1.6.2)

  • application.conf

    ...
    jwt {
        issuer = "https://cognito-idp.ap-northeast-1.amazonaws.com/__SPECIFY_POOL_ID_HERE__"
        audience = "__SPECIFY_CLIENT_ID_HERE__"
        realm = "ktor sample app"