Skip to content

Instantly share code, notes, and snippets.

View fenneh's full-sized avatar
🔥
Hi

fen fenneh

🔥
Hi
View GitHub Profile
@junxy
junxy / Logstash-log4net-README.md
Last active July 14, 2020 07:15 — forked from dterziev/logstash.conf
Logstash 2.1.x config for log4net logs.
<!- .... ->
<log4net>    
    <appender name="RollingLogFileAppenderLogstash" type="log4net.Appender.RollingFileAppender">
      <encoding value="utf-8" />
      <!--该目录必需有 IIS用户 写权限-->
      <file value="X:/var/log/[app_name]/logfile.log" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
@Dalmirog-zz
Dalmirog-zz / Update-StepTemplatesOnDeploymentProcesses.ps1
Last active September 14, 2015 22:42
Update-StepTemplatesOnDeploymentProcesses (nice name, i know)
<#
.Synopsis
Updates the Step Templates used on Deployment Processes to the latest versions
.DESCRIPTION
Step templates can be updated from the library on Octopus, but that doesnt mean that the Deployment processes using that template will start using the latest version right away. Normally, the user would have to update the step template on each deployment process manually. This script takes care of that.
.EXAMPLE
Update-StepTemplatesOnDeploymentProcesses -ActionTemplateID "ActionTemplates-3" -OctopusURI "http://localhost" -APIKey "API-RLMWLZBPMX5DRPLCRNZETFS4HA"
.EXAMPLE
Update-StepTemplatesOnDeploymentProcesses -AllActionTemplates -OctopusURI "http://Octopusdeploy.MyCompany.com" -APIKey "API-TSET42BPMX5DRPLCRNZETFS4HA"
.LINK
@mrlesmithjr
mrlesmithjr / nxlog.conf
Last active November 7, 2019 16:59
Windows nxlog.conf for Logstash
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
define ROOT_STRING C:\Program Files (x86)\\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,
@cube-drone
cube-drone / gist:7539342
Last active December 28, 2015 17:59
A long-form response to a tweet.

@classam hey dude, we spoke yesterday about things I should know for developing... Any resources that are helpful for learning?

Hey, Stuart. Lots of resources. So many resources that I could talk for days about them. So I'm going to:

  1. I got started with PHP - and a book called "Web Applications with PHP and MySQL" which is now starting to seriously show its age ( http://shop.oreilly.com/product/9780596005436.do ) - because deploying a PHP application is very, very easy. I'm not sure if I necessarily recommend it, because PHP is a total shit-show of a language, but it's an introduction to PHP, an introduction to MySQL, an introduction to getting those things to work together... a good way to get to the point where you can call yourself a web developer very quickly.

  2. Get comfortable with the Linux command line. If you're in for a long read about user interfaces, command lines, Linux, and Windows, unpack and absorb this thing: http://www.cryptonomicon.com/beginning.html - but the extreme tl;dr of that

@danriti
danriti / hipchat-v2.sh
Last active July 19, 2021 10:49
HipChat API v2 - Send a message to a room using cURL
#!/bin/bash
# Set the ROOM_ID & AUTH_TOKEN variables below.
# Further instructions at https://www.hipchat.com/docs/apiv2/auth
ROOM_ID=XXX
AUTH_TOKEN=XXX
MESSAGE="Hello world!"
curl -H "Content-Type: application/json" \
@athieriot
athieriot / gist:5532748
Last active June 19, 2021 13:32
Hipchat with IRSSI

If you are adventurous, here the process to have Hipchat working in your favourite IRC client:

param
(
[string] $EnvironmentName,
[string] $Version,
[string] $ProjectName,
[string] $OctopusApiKey,
[string] $OctopusServerUrl,
[string] $ReleaseNotes
)
@markrendle
markrendle / azureteamcitydb.sql
Created November 13, 2012 16:20
Schema for TeamCity DB in SQL Azure
/* DISCLAIMER
This script is published only as a reference.
No warranty is implied or offered.
If you use this and bad things happen, it's not my fault.
*/
/****** Object: Table [dbo].[action_history] Script Date: 13/11/2012 16:12:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
@Iristyle
Iristyle / nsc_check_longrunning_processes.ps1
Created September 26, 2012 17:29
A PowerShell script that emits Nagios compatible output when asked max number of processes running (over a certain amount of time) - use with NSClient++
Param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true)]
[string]
$Process,
[Parameter(Mandatory=$true)]
#[string]
[ValidatePattern("^(\d\.){0,1}(([0|1]\d)|(2[0-3])):[0-5]\d:[0-5]\d")]
$TimeSpan,