This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const red = (text) => ({ color: '31', text }) | |
const green = (text) => ({ color: '32', text }) | |
const white = (text) => ({ color: '0', text }) | |
const color = (strings, ...args) => { | |
const colorize = args.map(({ color, text }) => `\x1b[${color}m${text}`) | |
return strings.reduce((acc, item) => `${acc}${item}${colorize.shift() ?? ''}`, '') | |
} | |
console.log(color`${red`FAIL`} ${white`foobar`} ${green`pass`}`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
// Import the script from the url | |
function importScript(url) { | |
const request = new XMLHttpRequest() | |
request.onload = () => eval(request.responseText) | |
request.open('GET', url, true) | |
request.send() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.dot { | |
position: absolute; | |
height: 10px; | |
width: 10px; | |
display: block; | |
background: #000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- What we did to fix this bug, | |
-- https://hcmc.uvic.ca/blogs/index.php?blog=22&p=8105&more=1&c=1&tb=1&pb=1 | |
--SELECT MAX(id) FROM pilot; | |
--SELECT nextval('public.pilot_id_seq'); | |
--SELECT pg_get_serial_sequence('pilot', 'id') | |
--SELECT nextval('public.pilot_id_seq'); | |
--SELECT setval('public.pilot_id_seq', 13833); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<settings> | |
<profiles> | |
<profile> | |
<id>projectares</id> | |
<repositories> | |
<repository> | |
<id>freundtech</id> | |
<name>freundTech</name> | |
<url>https://repo.freundTech.com</url> | |
</repository> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://drive.google.com/file/d/1-hi-m5kGRTPjfQYTFQnu9n2FsDGmgy9Zjg/view?usp=sharing | |
https://drive.google.com/file/d/1pTMeF8LtF785sxkJE0TrxByNDKIaL_WDxA/view?usp=sharing | |
https://drive.google.com/file/d/1NUc0rKIHIWOM_m8znxIWzrxVnWfrOYHI1A/view?usp=sharing | |
https://drive.google.com/file/d/1-9IsI3zWt_rzoLwY5gA5knQU36glM7um_Q/view?usp=sharing | |
https://drive.google.com/file/d/1ORuHH8gcoJ5F557VHJkWce1tCplbU9nSHw/view?usp=sharing | |
https://drive.google.com/file/d/1s3zlxuf6Ya5FpAj93GDXpfPPYBfi3oibpQ/view?usp=sharing | |
https://drive.google.com/file/d/1YXmpsZgGnvkMQD4guFTlsiC5SJceqD4OyQ/view?usp=sharing | |
https://drive.google.com/file/d/1xZG2wTV9L4uHlmwFgpLTf8SrXVok1PCSZg/view?usp=sharing | |
https://drive.google.com/file/d/1NtXSu2JTpqgI-aTnV9oVq8dE6lHXlS-YrQ/view?usp=sharing | |
https://drive.google.com/file/d/1vHaf7dNE_Lz9JtOzu-OBac_WLaP5depa8A/view?usp=sharing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This python script is a lightweight script that ensures that the proper | |
# packages are installed on the remote host, must have hostname defined | |
# $ hostname new-host ; wget -O - goo.gl/G3JWa4 | python | |
import os | |
import sys | |
print('-' * 5 + ' [Ansible Bootstrap Script] ' + '-' * 5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("echo") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Copyright 2016 Year4000. All Rights Reserved. | |
from urllib.request import urlopen | |
from xml.etree.ElementTree import fromstring | |
import re | |
def set_up(): | |
""" Ask the user for the url and file name """ | |
# protocol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AFTER | |
public static Class<?>[] after(String str) throws Exception { | |
Conditions.nonNull(str, "str"); | |
str = str.substring(1, str.lastIndexOf(")")); | |
List<Class<?>> args = Lists.newArrayList(); | |
for (int i = 0 ; i < str.length(); i++) { | |
int a = i; | |
if (str.charAt(i) == '[') { // Process arrays | |
while (str.charAt(a) == '[' && i < str.length()) { |
NewerOlder