I hereby claim:
- I am lpar on github.
- I am meta23 (https://keybase.io/meta23) on keybase.
- I have a public key ASA7PxMoCOU9rSoehhs8ukKvGYk1ioM4GLQ-OTQslBIV3wo
To claim this, I am signing this object:
package main | |
// This is a quick Go program to rename radio shows downloaded from BBC iPlayer | |
// by removing the program IDs and _original from the end of the filename | |
// and converting underscores to spaces. | |
// Copyright status: WTFPL http://www.wtfpl.net | |
import ( | |
"fmt" |
#!/usr/bin/fish | |
# | |
# Fish script to run ssh-agent correctly, i.e. only start a new one when | |
# necessary. Drop it into ~/.config/fish/conf.d and forget about it. | |
# | |
# Uses ps and kill, everything else is done inside fish. | |
# | |
# Requires fish 2.3 for the string manipulation. | |
# | |
# Works with Fedora 26 and CentOS 7, for CentOS 6 you'll need a third party |
I hereby claim:
To claim this, I am signing this object:
The Hugo static site generator sadly still uses the obsolete and badly standardized RSS format.
Here's how to set it up to generate an Atom feed instead. Pretty much all feed readers which understand RSS also understand Atom, except iTunes, and Atom is a better format.
config.toml
:See https://forum.golangbridge.org/t/generation-of-strings-generation/2968/2 |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
// A detailed example of examining a struct value in Go via reflection, | |
// and changing field values (if possible). | |
// |
-- This is the script piece of an Automator workflow, it won't work without the rest of the workflow. | |
on run {input, parameters} | |
set maxDaysOld to 14 -- This is the number of days of stuff to keep | |
set oldFiles to {} | |
set oldFilesRef to a reference to oldFiles | |
repeat with n from 1 to length of input | |
set thing to item n of input | |
set dateAddedString to (do shell script "mdls -name kMDItemDateAdded -raw " & quoted form of POSIX path of thing) | |
set dateadded to the (date dateAddedString) | |
set daysold to ((current date) - dateadded) / 86400 |
/* | |
* © Copyright IBM Corp. 2016 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { | |
FILE *ifp, *ofp; | |
ofp = fopen("test.txt", "wb"); |