Skip to content

Instantly share code, notes, and snippets.

View sgeto's full-sized avatar

Ali Abdulkadir sgeto

View GitHub Profile
@sgeto
sgeto / Microsoft.PowerShell_profile.ps1
Created May 5, 2018 03:19 — forked from mjul/Microsoft.PowerShell_profile.ps1
Visual Studio 2013 developer prompt for PowerShell
pushd 'c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC'
cmd /c "vcvarsall.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
popd
write-host "`nVisual Studio 2013 Command Prompt variables set." -ForegroundColor Yellow
@sgeto
sgeto / profile.ps1
Created May 5, 2018 00:07 — forked from justinian/profile.ps1
Powershell init script to include vcvarsall.bat and set the window title.
# Load posh-git example profile
. '~\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
$GitPromptSettings.EnableFileStatus = $false
$global:CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent()
function Prompt() {
Write-Host ("PS " + $(get-location) ) -nonewline -foregroundcolor Magenta
Write-VcsStatus
@sgeto
sgeto / sprintf.c
Created April 26, 2018 05:03 — forked from Cr4sh/sprintf.c
Position independent sprintf without dependencies
/**
* Declaration
*/
/*
'tfp_format' really is the central function for all tinyprintf. For each output character
after formatting, the 'putf' callback is called with 2 args:
- an arbitrary void* 'putp' param defined by the user and passed unmodified from 'tfp_format';
- the character;
@sgeto
sgeto / fork.c
Created April 24, 2018 11:48 — forked from Cr4sh/fork.c
fork() for Windows
/*
* fork.c
* Experimental fork() on Windows. Requires NT 6 subsystem or
* newer.
*
* Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@sgeto
sgeto / mingw.common.targets
Created April 17, 2018 06:07 — forked from mitchelldavis/mingw.common.targets
MSBuild for MinGW
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Target Name="SetupProject">
<MakeDir Directories="$(MSBuildProjectDirectory)\obj;$(MSBuildProjectDirectory)\bin" />
</Target>
<Target Name="CleanProject">
<RemoveDir Directories="$(MSBuildProjectDirectory)\obj;$(MSBuildProjectDirectory)\bin" />
</Target>
@sgeto
sgeto / InstallNpcap.ps1
Last active September 10, 2024 11:01
A Non-Interactive Npcap Installation Script
# requires -version 4
#
# Copyright (C) 2018 Ali Abdulkadir <[email protected]> <[email protected]>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sub-license, and/or sell copies of the Software,
@sgeto
sgeto / github_gpg_key.md
Created February 22, 2018 01:55 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# Mac
@sgeto
sgeto / README.md
Created February 21, 2018 23:41 — forked from BoGnY/README.md
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@sgeto
sgeto / gencert.sh
Created February 16, 2018 18:00 — forked from bradland/gencert.sh
Generate a self-signed SSL cert
#!/bin/bash
# Bash shell script for generating self-signed certs. Run this in a folder, as it
# generates a few files. Large portions of this script were taken from the
# following artcile:
#
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html
#
# Additional alterations by: Brad Landers
# Date: 2012-01-27
@sgeto
sgeto / Github Flavored Markdown.md
Created January 24, 2018 23:57 — forked from stevenyap/Github Flavored Markdown.md
Github Flavored Markdown cheatsheet

Github Flavored Markdown (GFMD) is based on Markdown Syntax Guide with some overwriting as described at Github Flavored Markdown

Text Writing

It is easy to write in GFMD. Just write simply like text and use the below simple "tagging" to mark the text and you are good to go!

To specify a paragraph, leave 2 spaces at the end of the line

Headings