Skip to content

Instantly share code, notes, and snippets.

View jhinds's full-sized avatar

Jonathan Hinds jhinds

View GitHub Profile
@jhinds
jhinds / download-shared-icloud-link.sh
Created June 15, 2023 01:37
Download Shared iCloud Link

Setting up F# environment on MacOSX

https://fsharp.org/use/mac/

  1. Install mono brew install mono

  2. Install Paket https://fsprojects.github.io/Paket/installation.html git clone git@github.com:fsprojects/Paket.git

Keybase proof

I hereby claim:

  • I am jhinds on github.
  • I am jhinds (https://keybase.io/jhinds) on keybase.
  • I have a public key ASBG5IAKzHtSJQ-7xH0A2E4mUDwse3EQMZsyBgj16PED6go

To claim this, I am signing this object:

{{- define "ckan.ini" -}}
#
# CKAN - Pylons configuration
#
# These are some of the configuration options available for your CKAN
# instance. Check the documentation in 'doc/configuration.rst' or at the
# following URL for a description of what they do and the full list of
# available options:
#
# http://docs.ckan.org/en/latest/maintaining/configuration.html
{{- define "ckan-extensions" -}}
{{ if .Values.extensions.stats }}
stats
{{ end }}
{{ if .Values.extensions.text_view }}
text_view
{{ end }}
{{ if .Values.extensions.image_view }}
image_view
{{ end }}
List all DB connections
```sql
select *
from pg_stat_activity
where datname = 'ckan_modestoca'
```
@jhinds
jhinds / xloader-permission-denied-jobs-error.md
Created February 15, 2018 19:59
xloader-permission-denied-jobs-error.md
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rq/worker.py", line 588, in perform_job
    rv = job.perform()
  File "/usr/local/lib/python2.7/dist-packages/rq/job.py", line 498, in perform
    self._result = self.func(*self.args, **self.kwargs)
  File "/src/ckanext-xloader/ckanext/xloader/jobs.py", line 81, in xloader_data_into_datastore
    job_id, traceback.format_tb(sys.exc_traceback)[-1] + repr(e))
  File "/src/ckanext-xloader/ckanext/xloader/db.py", line 363, in mark_job_as_errored
    _update_job(job_id, update_dict)
@jhinds
jhinds / IAM Permissions List.md
Created July 19, 2017 21:56 — forked from mechcozmo/IAM Permissions List.md
A list of IAM permissions you can use in policy documents. Collected from the myriad of places Amazon hides them. (incomplete)
@jhinds
jhinds / csv-split.sh
Created May 18, 2017 18:38
Splitting a CSV & keeping headers
#!/bin/bash
# file that needs to be split
filename="big_file.csv"
# directory for split files
split_dir="splits"
# string to prepend files
split_prepend="small_file-"
# get the header from the first file
from optparse import make_option
from django.core.management.commands.loaddata import Command as LoadDataCommand
class Command(LoadDataCommand):
option_list = LoadDataCommand.option_list + (
make_option('-e', '--exclude', action='append',
help='Exclude given fixture/s from being loaded'),
)