Skip to content

Instantly share code, notes, and snippets.

View NikiforovAll's full-sized avatar
🇺🇦

Oleksii Nikiforov NikiforovAll

🇺🇦
View GitHub Profile
@mwhite
mwhite / git-aliases.md
Last active June 7, 2024 07:04
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@VivekMChawla
VivekMChawla / 00 - Salesforce Snippets: Comment Headers.md
Last active June 5, 2024 17:22
Collection of Apex "Comment Header" snippets.

This gist contains multiple files. Each file contains a specific type of Apex or Visualforce comment header.

When code is no longer used, but can not be deleted from your org, add the @deprecated annotation to the File or Method Header.

@davidfowl
davidfowl / dotnetlayout.md
Last active June 3, 2024 23:39
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@davidfowl
davidfowl / Example1.cs
Last active March 28, 2024 20:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
@ufcpp
ufcpp / Program.cs
Created October 28, 2016 03:33
index付きforeach
// 動作確認用
using System;
using System.Collections;
using System.Collections.Generic;
// ここの using 切り替えで、どの Indexed が呼ばれるかを切り替え
// 手元の環境だと以下の通り(GetTotalMemory の前後差分0が理想)
// A: 0
// B: 237568
// C: 720896
@wadewegner
wadewegner / devhub.sh
Created July 27, 2017 16:38
A bash script that uses the Salesforce CLI to determine if the org has the dev hub enabled
# specify your username or alias
usernameOrAlias="my@org.com"
# return a json result of
org="$(sfdx force:org:display -u ${usernameOrAlias} --json)"
# parse response
result="$(echo ${org} | jq -r .result)"
accessToken="$(echo ${result} | jq -r .accessToken)"
instanceUrl="$(echo ${result} | jq -r .instanceUrl)"

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@analogrelay
analogrelay / CommandLineException.cs
Last active March 22, 2024 11:50
My Command Line Template
using System;
using System.Runtime.Serialization;
namespace MyTool
{
[Serializable]
internal class CommandLineException : Exception
{
public CommandLineException()
{
@natemcmaster
natemcmaster / README.md
Last active April 2, 2024 18:27
runtimeconfig.json schema

This defines the schema for .NET Core's runtimeconfig.json file.

Usage in an editor

Using Visual Studio, you can get auto-completion if you import the schema in your .JSON file like this:

{
  "$schema": "https://gist.githubusercontent.com/natemcmaster/0bdee16450f8ec1823f2c11af880ceeb/raw/runtimeconfig.template.schema.json"
}
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active June 9, 2024 12:11
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands