Skip to content

Instantly share code, notes, and snippets.

@luvwinnie
luvwinnie / slack-exporter-with-token.py
Last active July 9, 2023 18:02
Slack exporter by using API SLACK_TOKEN
import json
import logging
import os
import zipfile
from datetime import datetime
import click
# Import WebClient from Python SDK (github.com/slackapi/python-slack-sdk)
from slack_sdk import WebClient
from slack_sdk.errors import SlackApiError
@andytwoods
andytwoods / MinimalSplitDateTimeMultiWidget.py
Last active March 21, 2023 21:09
Django splitDateTime widget, no JS, using modern HTML for time and date selectors
from datetime import datetime
from django.utils.timezone import make_aware
from django.forms import TextInput, MultiWidget, DateTimeField
# nightmare discussion here https://stackoverflow.com/questions/38601/using-django-time-date-widgets-in-custom-form
class MinimalSplitDateTimeMultiWidget(MultiWidget):
def __init__(self, widgets=None, attrs=None):
if widgets is None:
@misho-kr
misho-kr / Architecting with Google Kubernetes Engine: Foundations.md
Last active February 21, 2024 07:37
Overview of "Architecting with Google Kubernetes Engine: Foundations" from Coursera.Org

Review of the layout and principles of Google Cloud Platform, followed by an introduction to creating and managing software containers and an introduction to the architecture of Kubernetes.

Build efficient computing infrastructures using Kubernetes and Google Kubernetes Engine (GKE), deploy and manage containerized applications on GKE and the other services provided by Google Cloud Platform. Explore and deploy solution elements, including infrastructure components such as pods, containers, deployments, and services; as well as networks and application services. Security and access management, resource management, and resource monitoring.

Docs: Kubernetes, GKE, Use Cases amd [Tutorials](https

Repo

Haven't decided if I am going to submit code to it yet

Questions

👍 - Unlocked & Done 😊 - Locked & Done 🔒 - Locked & Not Done [] - Not yet Done

@ibraheem4
ibraheem4 / postgres-brew.md
Last active June 28, 2024 18:57 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@demmer
demmer / slack-messages-by-user.py
Created December 2, 2016 22:59
count slack messages posted to a channel by user
#!/usr/bin/python
'''
Script to count messages by user posted to a channel for a given date range.
Install:
# sudo pip install slackclient
Also you will need to obtain a slack API token:
https://api.slack.com/docs/oauth-test-tokens
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 4, 2024 04:16
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.