Skip to content

Instantly share code, notes, and snippets.

View jwbradley's full-sized avatar
🏠
Working from home

James W. Bradley jwbradley

🏠
Working from home
View GitHub Profile
@forstie
forstie / Well isnt that special.sql
Last active December 3, 2020 18:49
I was asked to provide a technique for the SQL user to access the special authorities granted to user and group profiles, and return the data in a non-list form for ease of reporting and analysis. To accomplish this request, I used the SYSTOOLS.SPLIT table function, but had to be careful to use the perfect split character (3 spaces), trim off bl…
--
-- Complete review of special authorities granted to user profiles
--
select user_name, ordinal_position, ltrim(element) as special_authority
from qsys2.user_info, table (
systools.split(rtrim(special_authorities), ' ')
) b
where user_name not in (select authorization_name
from qsys2.authids
where authorization_attr = 'GROUP');
@dsalazar-carecloud
dsalazar-carecloud / put-cmd.sh
Last active October 26, 2018 21:31
S3 Bucket Lifecycle Configuration (AWS CLI s3api cmd)
# AWS CLI required.
# s3api: http://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-lifecycle-configuration.html
aws s3api put-bucket-lifecycle-configuration --bucket <bucket-name> --lifecycle-configuration file://<path-to-policy-json>
# Policy file example
# {
# "Rules": [
# {
# "ID": "Expires in 120 DAYS",
# "Prefix": "",
@d3m3vilurr
d3m3vilurr / feedly_api.md
Last active March 22, 2025 21:12
Unofficial Feedly API Document

IDs

  • user_id - user/:uid
  • feed_id - feed/:feed_uri
  • category_id - :user_id/category/:category (special category: global.all, global.uncategorized)
  • tag_id - :user_id/tag/:tag (special tag: global.saved)

APIs

http://cloud.feedly.com/:version/:api

@streamsend
streamsend / gist:439378
Created June 15, 2010 17:01
How to parse headers from a CURL response
<?
class CurlResponse
{
var $headers = array();
function CurlResponse () {}
function parse_header ($handle, $header)