Useful commands to use in Shell or others:
This is a simple guide for non-pro bash users to do random but annoying tasks in just seconds
Your boss will be happy and you'll be less stressed ;)
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/ | |
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6 | |
function doGet(e){ | |
return handleResponse(e); | |
} | |
// Enter sheet name where data is to be written below | |
var SHEET_NAME = "Sheet1"; |
This is a simple guide for non-pro bash users to do random but annoying tasks in just seconds
Your boss will be happy and you'll be less stressed ;)
import pandas as pd | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import confusion_matrix | |
from sklearn.metrics import accuracy_score | |
# import warnings filter | |
from warnings import simplefilter | |
# ignore all future warnings | |
simplefilter(action='ignore', category=FutureWarning) |
#!/bin/env python | |
import socket, sys | |
PRINTER_IP = '10.1.11.121' | |
PORT = 9100 | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.connect((PRINTER_IP, PORT)) | |
zpl = '' | |
zpl += '^XA' |
for file in *.wma; do ffmpeg -i "${file}" -acodec libmp3lame -ab 192k "${file/.wma/.mp3}"; done
$('#observeMe').appearanceObserver({
onAppeared: function () {
// I am appeared callback
},
onDisappeared: function () {
// I am disappeared callback
}
});
document.addEventListener("DOMContentLoaded", function () { | |
var productCartButton = document.querySelector('.product-cart'), stickyAddToCartButton = document.querySelector('.sticky-add-to-cart'), previousTop = 0; | |
if ("IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype) { | |
let productCartButtonObserver = new IntersectionObserver(function (entries, observer) { | |
entries.forEach(function (entry) { | |
let addToCartButton = entry.target, | |
showstickyAddToCartButton = (entry.boundingClientRect.top < previousTop && entry.boundingClientRect.top < 0); | |
if (showstickyAddToCartButton) { |
{% macro icon() %} | |
<svg xmlns="http://www.w3.org/2000/svg" style="display:none"> | |
<symbol id="flag-icon-css-ad" viewBox="0 0 640 480"> | |
<path fill="#d0103a" d="M0 0h640v480H0z"/> | |
<path fill="#fedf00" d="M0 0h435.2v480H0z"/> | |
<path fill="#0018a8" d="M0 0h204.8v480H0z"/> |
.bg-gradient { | |
/* Old browsers */ /* FF3.6-15 */ /* Chrome10-25,Safari5.1-6 */ /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ | |
background: -moz-linear-gradient(bottom, rgb(230, 230, 231, 1) 0%, rgba(255,255,255,0) 100%); | |
/* FF3.6-15 */ | |
background: -webkit-linear-gradient(bottom, rgb(230, 230, 231, 1) 0%,rgba(255,255,255,0) 70%); | |
/* Chrome10-25,Safari5.1-6 */ | |
background: linear-gradient(to top, rgb(230, 230, 231, 1) 0%,rgba(255,255,255,0) 70%); |
find . -type f -name "*.php" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v 'No syntax errors' |