Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# --- Version history ---
# mrn: sleep for $freq instead of 3 seconds (forked)
# 0.4: added variable to store file path, and $2 for base file name
# added variable to store desired reporting interval
# 0.3: added $1 to send in process ID at run time.
# 0.2: switched to $SECONDS for the loop. works.
# 0.1: didn't work well at all.
# --- Version history ---
@Dulani
Dulani / minecraft_commands.txt
Created September 30, 2018 02:26 — forked from Dinnerbone/minecraft_commands.txt
Minecraft Java Edition 1.13 changes
advancement grant <targets> everything
advancement grant <targets> from <advancement>
advancement grant <targets> only <advancement>
advancement grant <targets> only <advancement> <criterion>
advancement grant <targets> through <advancement>
advancement grant <targets> until <advancement>
advancement revoke <targets> everything
advancement revoke <targets> from <advancement>
advancement revoke <targets> only <advancement>
advancement revoke <targets> only <advancement> <criterion>
@Dulani
Dulani / gitlab-ci.yaml
Created August 8, 2018 00:22
Gitlab CI and deployment
image: php:5.6
stages:
- test
- build
- deploy
test:
stage: test
script: echo "Running tests"
@Dulani
Dulani / strip-autocomplete.user.js
Created August 7, 2018 15:54 — forked from david0/strip-autocomplete.user.js
Greasymonkey/Tampermonkey script that strips "autocomplete" attributes from username and password fields
// ==UserScript==
// @name Strip autocomplete attributes
// @namespace david0
// @version 0.1
// @description This plugin gives the control about your passwords back to your browser and allows the browser to store every password.
// @include http://*
// @include https://*
// @copyright 2014, David
// ==/UserScript==
@Dulani
Dulani / usingCodeCommitAWS.md
Created December 26, 2017 13:21 — forked from JohannMG/usingCodeCommitAWS.md
Setting Up AWS CodeCommit (Mac) with Sourcetree and disabling keychain

#Setting Up AWS CodeCommit (Mac)

For all possibilities, amazon has guides here: http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up.html

We chose to use HTTPS here

If git asks you to manually enter username or password it is incorrectly configured!

Similar to RSA, the AWS CLI credential-helper should be using your keys to create and send a dynamic password that updates every 15 minutes.

@Dulani
Dulani / notify.py
Created November 18, 2017 04:43 — forked from lukaszb/notify.py
Simple Python script to send notification to the OSX Notifications Center (requires OS X 10.8+). Tested with pyobjc 2.5.1
#!/usr/bin/env python
from Foundation import NSUserNotification
from Foundation import NSUserNotificationCenter
from Foundation import NSUserNotificationDefaultSoundName
from optparse import OptionParser
def main():
parser = OptionParser(usage='%prog -t TITLE -m MESSAGE')
@Dulani
Dulani / r_ubuntu_17_10.sh
Created October 22, 2017 14:23 — forked from pachadotdev/r_ubuntu_17_10.sh
Install R on Ubuntu 17.10
# Install R
sudo apt-get update
sudo apt-get install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev r-base r-base-dev
# Install RStudio
cd Downloads
wget https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb
sudo gdebi rstudio-xenial-1.1.383-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile
@Dulani
Dulani / pandoc.css
Created July 28, 2017 20:31 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@Dulani
Dulani / pdfcrop.py
Created June 2, 2017 01:49 — forked from alexzhan/pdfcrop.py
Use pyPdf to crop a pdf file according to user inputs
#!/usr/bin/env python
import sys
if __name__ == '__main__' and len(sys.argv) > 5 and sys.argv[1][-3:].upper() == 'PDF':
original = sys.argv[1]
target = original[:-4] + '.cropped.pdf'
left = int(sys.argv[2])
top = int(sys.argv[3])
right = int(sys.argv[4])
@Dulani
Dulani / index.html
Created March 22, 2017 23:34 — forked from anonymous/index.html
NIJ PCJNI Delphi // source http://jsbin.com/micekex
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<script src="delphi-nij.js"> </script>
<link rel="stylesheet" type="text/css" href="delphi-nij.css">
<title>NIJ PCJNI Delphi</title>