Skip to content

Instantly share code, notes, and snippets.

@oriadam
oriadam / GetZipErrMessage.php
Last active March 16, 2022 09:22
ZipArchive error code to string
function GetZipErrMessage($errno)
{
if ($errno===true) return '';
switch($errno)
{
case 0: return 'No error'; //ZIP_ER_OK
case 1: return 'Multi-disk zip archives not supported'; //ZIP_ER_MULTIDISK
case 2: return 'Renaming temporary file failed'; //ZIP_ER_RENAME
case 3: return 'Closing zip archive failed'; //ZIP_ER_CLOSE
case 4: return 'Seek error'; //ZIP_ER_SEEK
@oriadam
oriadam / coda.rtl.user.js
Last active April 25, 2022 15:41
support rtl in coda
// ==UserScript==
// @name support rtl in coda
// @namespace http://tampermonkey.net/
// @version 8
// @author Oria
// @match https://coda.io/*
// @grant GM_addStyle
// ==/UserScript==
(function() {