Skip to content

Instantly share code, notes, and snippets.

View watter's full-sized avatar

Leslie H Watter watter

View GitHub Profile
@jovemfelix
jovemfelix / manage-role-strategy-of-jenkins-using--rest-api.md
Last active September 12, 2022 08:40
How to Manage and Assign Roles of Jenkins using CURL

Variables

# credentials info
USERNAME='my-username'
PASSWORD='my-clear-password'
USER_PASS="${USERNAME}:${PASSWORD}"
@daviderestivo
daviderestivo / drestivo-org-download-method.el
Created August 30, 2017 12:07
This is an helper function for org-download. It creates an \"./image\" folder within the same directory of the org file. Images are separated inside that image folder by additional folders one per org file.
(defun drestivo/org-download-method (link)
"This is an helper function for org-download.
It creates an \"./image\" folder within the same directory of the org file.
Images are separated inside that image folder by additional folders one per
org file.
More info can be found here: https://github.com/abo-abo/org-download/issues/40.
See the commit message for an example:
https://github.com/abo-abo/org-download/commit/137c3d2aa083283a3fc853f9ecbbc03039bf397b"
(let ((filename
(file-name-nondirectory
@boina-n
boina-n / smtp-telnet.sh
Last active November 9, 2022 03:58
Use telnet to send email with an attachement
#!/bin/bash
filename="/path/to/your/file.log"
subject="Subject of my email"
txtmessage="This is the message I want to send"
{
sleep 1;
echo "EHLO mydomain.intra"
sleep 1;
@tkhoa2711
tkhoa2711 / get-ip-address.el
Created March 9, 2016 02:47
Retrieve IP address using Emacs Lisp (on Windows and UNIX)
(defun get-ip-address (&optional dev)
"Get the IP-address for device DEV (default: eth0) of the current machine."
(let ((dev (if dev dev "eth0")))
(format-network-address (car (network-interface-info dev)) t)))
@maxivak
maxivak / 00. tutorial.md
Last active September 11, 2024 19:58
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@watter
watter / i-link-trac-ticket
Created September 12, 2012 13:47
Function that inserts a link to our trac instalation depending on which server it is located