Skip to content

Instantly share code, notes, and snippets.

View hapylestat's full-sized avatar
:octocat:
Looking for time compression tool

hapylestat

:octocat:
Looking for time compression tool
View GitHub Profile
#!/bin.sh
echo "Test string";
@hapylestat
hapylestat / ps-jira-connector.ps
Created August 14, 2013 11:12
Allows ps script to access JIRA data via REST interface
#========================================
# ps-jira-connect
# Author: H.L.
# Version: 0.1
# Description: JIRA Connector
# Created: 8/14/2013 4:08 AM
#========================================
$ps_jira_connect={
@hapylestat
hapylestat / template_ps-class.ps1
Created August 14, 2013 11:20
Template for creating new PS Classes
#=================================as custom object
$<classname>_code={
function init(){
}
@hapylestat
hapylestat / ps-exec.cmd
Created August 14, 2013 11:37
Variation of executing powershell scripts
1. Via stdin
type "%~dp0<my_script>.ps1" | powershell.exe -command -
2. Default way
powershell.exe -File "%~dp0<my_script>.ps1"
@hapylestat
hapylestat / ps-check-apartment.ps1
Created August 14, 2013 11:38
Check apartment state of currently started ps-environment
[threading.thread]::CurrentThread.GetApartmentState()
@hapylestat
hapylestat / ps-create-object-with-properties.ps1
Created August 14, 2013 11:42
Create .NET object with properties
#1. ========object
$<variable> = New-Object PSObject -Property @{
<field 1> = <value>
<field 2> = <value>
}
#2. ========hashtable
$<variable> = @{
<name> = <value>
}
@hapylestat
hapylestat / functions
Created August 23, 2013 14:38
[bash-tool] Little bash framework, which helps write trivial thinks more simply
#!/bin/bash
#=====bash color constants
CORENAME="BCore"
COREVER="0.2a"
#----note: use "echo -e" is required
COLOR_BEGIN="\033["
COLOR_RED="${COLOR_BEGIN}0;31m"
COLOR_LIME="${COLOR_BEGIN}1;32m"
COLOR_BR="${COLOR_BEGIN}1;38;05;51m"
COLOR_ITEM="${COLOR_BEGIN}1;38;05;214m"
@hapylestat
hapylestat / template
Created August 23, 2013 14:39
[bash-tool] Template for new script based on framework
#!/bin/bash
######################################
# Shell script #
# Author: H.L. #
# TPL Version: 0.1 #
######################################
#========================Global variables
APPVER="0.1b"
MYDIR=`echo $0`
@hapylestat
hapylestat / makescript
Created August 23, 2013 14:41
[bash-tool] Create new script from template. How to use: - Copy script with template to installdir - Make symlink to /usr/bin or other globaly searchable directory
#!/bin/bash
######################################
# Shell script #
# Author: H.L. #
# TPL Version: 0.1 #
######################################
#========================Global variables
APPVER="0.1b"
MYDIR=`echo $0`
@hapylestat
hapylestat / git_newrepo.sh
Created August 23, 2013 14:46
[bash-tool] Create new bare git repository with allowing push module and applying properly permissions. Used for GIT-over-http repositories with http-basic auth
#!/bin/bash
######################################
# Shell script #
# Author: H.L. #
# TPL Version: 0.1 #
######################################
#========================Global variables
APPVER="0.1b"
MYDIR=`echo $0`