Skip to content

Instantly share code, notes, and snippets.

View init-local.el
;; 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 Mar 7, 2019
Simple logger for sending updates to Slack using incoming webhook
View slacklog.py
#!/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
View javalinelimt.py
#!/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