Ensure you have TypeScript installed globally using this command:
npm install -g typescript
This outlines how to setup a new TypeScript project with mocha support.
#!/usr/bin/env python3 | |
""" | |
Generate a Clang AST (in JSON format) from a compilation database. Adapted from | |
run-clang-format.py. | |
I use [bear](https://github.com/rizsotto/Bear) to generate the compilation | |
database. | |
Author: Adrian Herrera |
import difflib | |
import wasabi | |
def diff_strings(a, b): | |
output = [] | |
matcher = difflib.SequenceMatcher(None, a, b) | |
for opcode, a0, a1, b0, b1 in matcher.get_opcodes(): | |
if opcode == "equal": | |
output.append(a[a0:a1]) | |
elif opcode == "insert": |
Spring Boot + Docker Multistage = Smaller container size
Use can use prebuild version by using:
$ docker run -d -p 8080:8080 saboteurkid/smaller-spring:1.0
Wait for docker to pull and up. Then jump to step #6
task resolveDependencies { | |
setDescription "Resolves all projects dependencies from the repository." | |
setGroup "Build Server" | |
doLast { | |
rootProject.allprojects { project -> | |
project.buildscript.configurations.forEach { configuration -> | |
if (configuration.canBeResolved) { | |
configuration.resolve() | |
} |
import com.google.gson.JsonArray; | |
import com.google.gson.JsonObject; | |
import com.neovisionaries.ws.client.WebSocket; | |
import com.neovisionaries.ws.client.WebSocketAdapter; | |
import com.neovisionaries.ws.client.WebSocketFactory; | |
/** | |
* Mendekotasunak: (maven bidez instalatu) | |
* gson-2.8.2 | |
* nv-websocket-client-2.3 |
import smtplib | |
import os | |
def send_email(host, port, username, password, subject, body, mail_to, mail_from = None, reply_to = None): | |
if mail_from is None: mail_from = username | |
if reply_to is None: reply_to = mail_to | |
message = """From: %s\nTo: %s\nReply-To: %s\nSubject: %s\n\n%s""" % (mail_from, mail_to, reply_to, subject, body) | |
print (message) | |
try: |
# inspired by http://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang/ | |
import sys | |
import clang.cindex | |
def verbose(*args, **kwargs): | |
'''filter predicate for show_ast: show all''' | |
return True | |
def no_system_includes(cursor, level): | |
'''filter predicate for show_ast: filter out verbose stuff from system include files''' |
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |