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
#!/bin/bash | |
# ====================== | |
# Check Azure CLI is installed | |
# ====================== | |
if ! [ -x "$(command -v az)" ]; then | |
echo 'Error: Azure cli is not installed.' >&2 | |
exit 1 | |
fi |
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
import click | |
import re | |
def parse_processed_log(processed_log_file): | |
"""Parse the processed log file from | |
$ node --prof-process isolate.log > proc.log | |
Prints and returns the summary | |
:param processed_log_file: <str> |
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/env bash | |
############################################# | |
# node profiler | |
# Runs the Node V8 Profiler | |
# and analyzes the output after the node app | |
# exits | |
# usage example: | |
# $ sh np.sh index.js --my-flag --my-arg 42 & | |
# $ pid=$! | |
# $ kill -s USR1 $pid |
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
/* value_equals.js | |
The MIT License (MIT) | |
Copyright (c) 2013-2017, Reactive Sets | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
import { Component } from 'react'; | |
import ReactDOM from 'react-dom'; | |
class InventoryView extends Component { | |
getTableBodyAsReactElement() { | |
let inv = [{'upc': 123}, {'upc': 454}]; | |
console.log('inv: ', inv); | |
return (!inv) ? null : ( | |
<tbody> |
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
let alphabet = [...Array(26).keys()] | |
.map(x => x + 65) | |
.map(x => String.fromCharCode(x)); | |
console.log(alphabet); | |
// [0, 1, ..., 9, A, B, C, ..., Z] | |
// let alphanumericCharacters = _.concat(_.range(10), alphabet); | |
let alphanumericCharacters = [...Array(10).keys()] | |
.concat(alphabet); |
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
sudo su - | |
wget -O - https://nightly.odoo.com/odoo.key | apt-key add - | |
echo "deb http://nightly.odoo.com/11.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list | |
apt update && apt-get install odoo -y | |
sudo apt install python3-pip -y | |
sudo pip3 install vobject qrcode | |
sudo apt install libldap2-dev libsasl2-dev | |
sudo pip3 install pyldap | |
sudo pip3 install xlwt |
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
// UpdateOSTime.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <windows.h> | |
#include <iostream> | |
/* source from: https://stackoverflow.com/a/652391/3854436 | |
* VS 2017 needed some project config changes: https://stackoverflow.com/a/20595744/3854436 | |
*/ |
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
from heapq import * | |
class A: | |
def __init__(self, val): | |
self.val = val | |
def __lt__(self, cmp): | |
"""Overwrite this to do the opposite of what's | |
expected""" |
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
<annotation> | |
<folder>wakfu2</folder> | |
<filename>iron ore4.jpg</filename> | |
<path>/home/j/_Github-Projects/raccoon-dataset/images/iron ore4.jpg</path> | |
<source> | |
<database>Unknown</database> | |
</source> | |
<size> | |
<width>2552</width> | |
<height>1378</height> |