Skip to content

Instantly share code, notes, and snippets.

@Egor-Skriptunoff
Egor-Skriptunoff / how_to_install_lua_and_luajit_on_windows.md
Last active October 5, 2024 00:01
How to install Lua and LuaJIT on Windows

How to install Lua and LuaJIT on 64-bit Windows

  1. Download the latest Lua and LuaJIT sources

    • Create temporary folder for Lua sources.
      I assume you would use C:\Temp\ folder.

    • Visit Lua FTP webpage and download the latest Lua source archive, currently it is lua-5.4.3.tar.gz

  • Use suitable software (7-Zip, WinRar, WinZip or TotalCommander) to unpack the archive.
@xandkar
xandkar / HOTP.java
Created June 29, 2015 02:29
HOTP reference implementation from RFC 4226
/*
* HOTP.java
* OATH Initiative,
* HOTP one-time password algorithm
*
*/
/* Copyright (C) 2004, OATH. All rights reserved.
*
* License to copy and use this software is granted provided that it
@JaDogg
JaDogg / HTMLEditorCustomizationSample.java
Last active October 2, 2020 17:20 — forked from jewelsea/HTMLEditorCustomizationSample.java
Insert An Image On Caret Position JavaFX:HTMLEditor
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToolBar;
import javafx.scene.web.HTMLEditor;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
@yuuichi-fujioka
yuuichi-fujioka / install_start_stop_daemon.sh
Created June 7, 2014 15:11
install start-stop-daemon to centos, fedora, redhat.
#!/bin/bash
cd /usr/local/src
wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
tar zxvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps/sys-utils/start-stop-daemon-IR1_9_18-2
gcc start-stop-daemon.c -o start-stop-daemon
cp start-stop-daemon /usr/sbin/
@ungoldman
ungoldman / curl_post_json.md
Last active October 27, 2024 00:49
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@mmahadevan-okta
mmahadevan-okta / conf.log4j
Created January 9, 2014 00:01
Configuration file for grc # grc -c conf.log4j tail -f /usr/local/Cellar/tomcat/7.0.47/libexec/logs/catalina.out
# From http://fahdshariff.blogspot.ca/2011/04/highlighting-command-output-with.html
# this configuration file is suitable for displaying log files
#errors
regexp=^.*(ERROR|Error|Exception).*$
colours=bold red
======
#stack trace
regexp=^\s+at [^:]*:\d*\)$
colours=red
@didip
didip / download-centos-mirror.sh
Last active March 13, 2019 13:53
Simple script to download CentOS mirror. You can totally put this in cron.
#!/bin/bash
# Number of arguments should be at least 1
if [ $# -lt 1 ]; then
echo "Usage: $0 centos-version-number"
exit 1
fi
VERSION=$1
@dersteppenwolf
dersteppenwolf / WordpressXMLRpcClient.java
Created November 23, 2012 16:15
Create New Posts in Wordpress using Java and XMLRpc
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
/**
* Create New Posts in Wordpress using Java
*
* //http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.newPost
@maxpert
maxpert / DumpIndexWriter.java
Created October 8, 2012 16:59
Lucene redis example
package mxp;
import java.io.IOException;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.NumericField;
import org.apache.lucene.index.CorruptIndexException;