Skip to content

Instantly share code, notes, and snippets.

View imacros-cheatsheet.js
// iMacro CheatSheet - Command Reference
// http://wiki.imacros.net/Command_Reference
// iMacros supports 3 types of variables:
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
// * Built-in variables. They contain certain values set by iMacros.
// * User-defined variables. They are defined in-macro using the SET command.
@hillmanli-seekers
hillmanli-seekers / TestDouble.java
Last active Nov 1, 2020
BigDecimal vs double: illustration of accuracy and performance impact
View TestDouble.java
import java.math.BigDecimal;
import java.util.function.Consumer;
import java.util.function.DoubleSupplier;
import java.util.stream.DoubleStream;
public class TestDouble {
private static double doubleTotal = 0;
private static double kahanDoubleTotal = 0;
@baderj
baderj / tutorial_themoviedb.py
Last active Nov 1, 2020
Example how to use the API v3 of "The Movie Database" (themoviedb.org). Saves all available posters for the movie with IMDb id tt0095016 to the current folder, using the maximum available resolution.
View tutorial_themoviedb.py
import os
import requests
CONFIG_PATTERN = 'http://api.themoviedb.org/3/configuration?api_key={key}'
IMG_PATTERN = 'http://api.themoviedb.org/3/movie/{imdbid}/images?api_key={key}'
KEY = '<your_api_key>'
def _get_json(url):
r = requests.get(url)
return r.json()
@tekin
tekin / .gitattributes
Last active Nov 1, 2020
An example .gitattributes file that will configure custom hunk header patterns for some common languages and file formats. See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details.
View .gitattributes
*.c diff=cpp
*.h diff=cpp
*.c++ diff=cpp
*.h++ diff=cpp
*.cpp diff=cpp
*.hpp diff=cpp
*.cc diff=cpp
*.hh diff=cpp
*.m diff=objc
*.mm diff=objc
View VMware Workstation 15.x.x serial key
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
View AnimationName-1604190974599-683.css
.css-selector {
    background: linear-gradient(270deg, #ea0000, #009ef7, #43f700, #ffab00, #ff0085);
    background-size: 1000% 1000%;
    -webkit-animation: AnimationName 35s ease infinite;
    -moz-animation: AnimationName 35s ease infinite;
    -o-animation: AnimationName 35s ease infinite;
    animation: AnimationName 35s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
View gd-gif.php
<?php
//php gd-gif.php image.gif gd-image.gif
$gif = imagecreatefromgif($argv[1]);
imagegif($gif, $argv[2]);
imagedestroy($gif);
?>
@itzg
itzg / KafkaStreamsConfig.java
Created Aug 24, 2018
Example of configuring Kafka Streams within a Spring Boot application with an example of SSL configuration
View KafkaStreamsConfig.java
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.streams.KafkaStreams;
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.Topology;
import org.apache.kafka.streams.kstream.GlobalKTable;
import org.apache.kafka.streams.kstream.KStream;
import org.apache.kafka.streams.kstream.Materialized;
@dasMulli
dasMulli / DemoSetup.wixproj
Last active Nov 1, 2020
Demo wix project to publish a self-contained .NET Core app
View DemoSetup.wixproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>91e4dc15-312a-4e90-bc1c-01de5dc99447</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>CoreConsoleAppSetup</OutputName>
<OutputType>Package</OutputType>
@acbetter
acbetter / QImageViewer.py
Last active Nov 1, 2020
Image Viewer Example by PyQt5 and Python 3
View QImageViewer.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter
from PyQt5.QtPrintSupport import QPrintDialog, QPrinter
from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \
qApp, QFileDialog
You can’t perform that action at this time.