Skip to content

Instantly share code, notes, and snippets.

@p4ul
p4ul / getupdates.sh
Created January 22, 2013 23:20
check svn for updates and get formatted text for redmine broadcast
echo -e "Files to change:\n" \
&& svn st -u | grep -v ? \
&& echo -e "\nChange Log:\n" \
&& svn log -r BASE:HEAD | grep -v -e '^\-\|^$\|^r[0-9].'| sort -u | awk '{print "* " $0}'
@p4ul
p4ul / upme.php
Last active December 11, 2015 22:18
This is a script that will update a Drupal site from git (github), clear the cache and send a deployment notice to New Relic. This can be called from github service hooks, CI server or browser. This is not recommended for a production environment unless you add some security / firewall rules etc.
<pre>
<?php
/**
Modify the capitalised variables with your info.
Call this from your github webservice hook / CI server.
If you are not using new relic you need to remove that cruft.
(the last 3 lines)
@dodyg
dodyg / gist:5823184
Last active May 7, 2025 20:27
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@shevron
shevron / LICENSE
Last active April 28, 2020 02:28
Send EC2 instance memory usage stats to CloudWatch using boto and IAM Roles
Copyright (c) 2015, Shahar Evron
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,