Skip to content

Instantly share code, notes, and snippets.

<entry>
<title>{{ post.title }}</title>
{% if post.type != 'link' %}
<link href="http://kevrodg.net{{ post.url }}"/>
{% else %}
<link href="{{ post.link }}"/>
{% endif %}
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>http://kevrodg.net{{ post.id }}</id>
<content type="html"><![CDATA[{{ post.content }}
<div class="article">
{% if page.type == 'link' %}
<p><a href="{{ page.link }}">{{ page.title }}</a></p>
{{ content }}
<p>This item was posted on {{ page.date | date: "%B %e, %Y "}} </p>
{% else %}
<h1> {{page.title}} </h1>
<p>{{ page.date | date: "%B %e, %Y "}}</p>
{{ content }}
{% endif %}
# PS1="\n\u:\w \n→ "
export PS1="\n\e[0;32m\u@\h:\e[m\e[0;34m\w\e[m \n→ "
export EDITOR=vim
# simple note taking tool
n() {
$EDITOR ~/Text/"$*".txt
}
nls() {
tell application "Mail"
set _msgs to selection
set _mailbox to "@action"
repeat with _msg in _msgs
tell application "Mail"
move the _msg to mailbox _mailbox
end tell
end repeat
end tell
{
"always_show_minimap_viewport": true,
"auto_indent": true,
"auto_match_enabled": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "auto",
"font_face": "JetBrains Mono NL",
"font_size": 14,
"highlight_line": true,
import urllib2
import csv
pws = []
# Set the number of passwords you want in the range.
for i in range(350):
# for strong passwords
r = urllib2.urlopen('http://www.dinopass.com/password/strong')
# for simple passwords
Import-Module activedirectory
Import-Csv "user_pw.csv" | Foreach {
$user = $_.sAMAccountName
$pw = $_.Password
try {
Set-ADAccountPassword -Identity $user -NewPassword (ConvertTo-SecureString $pw -AsPlainText -force) -Reset
Write-Output "$user,Success"
} catch {
Write-Output "$user,Error"
}
# For making a report of .mbox content
import mailbox
mbox = mailbox.mbox('chat.mbox')
i=1
for message in mbox:
print "<h2> Message # ",i,"</h2>"
print "from :",message['from'],"</br>"
print "subject:",message['subject'],"</br>"
#!/bin/bash
#
# If Nifty drive is mounted, unmounts it and puts the computer to sleep.
# If Nifty drive is unmounted, mounts it.
#
DEV="/dev/""$(diskutil info Nifty | grep 'Part of Whole' | cut -d : -f 2 | sed 's/^ *//g')"
if [ $(mount | grep -c $DEV) == 1 ]
then
import csv
import datetime
today = datetime.date.today()
v = open('fg.csv')
r = csv.reader(v)
output = []
# row0.append('berry')
next(r, None)