Skip to content

Instantly share code, notes, and snippets.

@aczzdx
aczzdx / init-local.el
Created January 16, 2020 07:53
my emacs.d
;; Setup Use-Package
(require-package 'use-package)
;; Enable defer and ensure by default for use-package
(setq use-package-always-defer t
use-package-always-ensure t)
;; Enable somehting
;; Enable scala-mode and sbt-mode
@aczzdx
aczzdx / slacklog.py
Created March 7, 2019 05:18
Simple logger for sending updates to Slack using incoming webhook
#!/usr/bin/env python3
# Change the following url as the webhook requested from the Slack App
SLACK_WEBHOOK = "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
import requests
def slack_msg(text):
return requests.post(SLACK_MSG_HOOK, json={"text":text})
# a sample to send
#!/usr/bin/env python3
""" javalinelimit.py
This file is an extremly simple method-line-limit checker for java codes for USC CS 455.
Assumptions: we assmue that the codes has followed all the other code-style
requirements.
"""
import re
import sys