Skip to content

Instantly share code, notes, and snippets.

View jtroussard's full-sized avatar

Jacques Troussard jtroussard

  • Pittsburgh, PA
View GitHub Profile
@filiperdt
filiperdt / controller.java
Created July 25, 2021 02:18
Return enum in REST Spring
@GetMapping(value = "/foo")
@ResponseBody
public ResponseEntity<List<YourEnum>> listYourEnum() {
return new ResponseEntity<List<YourEnum>>(Arrays.asList(YourEnum.values()), HttpStatus.OK);
}
@lotusirous
lotusirous / app.py
Created January 26, 2019 12:38
Example of flask blueprint and register logging to root logger
import logging
from flask import Flask
from werkzeug.utils import find_modules, import_string
def configure_logging():
# register root logging
logging.basicConfig(level=logging.DEBUG)
logging.getLogger('werkzeug').setLevel(logging.INFO)
@iamjason
iamjason / us-states-array
Created December 29, 2014 01:31
Swift US States Array
let state = [ "AK - Alaska",
"AL - Alabama",
"AR - Arkansas",
"AS - American Samoa",
"AZ - Arizona",
"CA - California",
"CO - Colorado",
"CT - Connecticut",
"DC - District of Columbia",
"DE - Delaware",
@pibby
pibby / jekyll-bash-new-post
Last active May 16, 2021 23:16
This bash script will setup a new Jekyll blog post in Markdown and open it for editing in Sublime Text 2
#!/bin/bash
# Katie Harron - @pibby
# This bash script will setup a new Jekyll blog post in Markdown and open it for editing in Sublime Text 2
echo "Post Title: "
read title
echo "Post Description: "
read desc
echo "Post Tags: "
read tags