Skip to content

Instantly share code, notes, and snippets.

View denazebiz's full-sized avatar

Deniss Azema denazebiz

  • freelance
  • Birmingham UK
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Copy Paste Events</title>
<style>
p span {
font-style: italic;
font-weight: 100;
//The Local API file code
var api = (function(){
var prop1 = 'prop1';
var prop2 = 2;
var prop3 = true;
var prop4 = Date.now();
var prop5 = ['yes', 'no', 'maybe'];
var init: function(){
@deviantony
deviantony / README.md
Last active December 4, 2025 20:26
Portainer HTTP API by example

DEPRECATION NOTICE

This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!

THE FOLLOWING DOCUMENTATION IS DEPRECATED

Please refer to the link above to get access to our updated API documentation and examples.

@martincarlin87
martincarlin87 / gulpfile.js
Last active April 15, 2024 07:08
Example gulpfile for PHP, SASS, Watching, Minifying, Optimising, Live Reload and Deploying
var gulp = require('gulp');
var gutil = require('gulp-util');
var argv = require('minimist')(process.argv);
var prompt = require('gulp-prompt');
var rsync = require('gulp-rsync');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var browserSync = require('browser-sync');
var useref = require('gulp-useref');
@tsawler
tsawler / default
Created December 31, 2015 16:46
nginx configuration if you are *not* using /vagrant/public for document root. This file goes in /etc/nginx/sites-available/default
server {
listen 80;
server_name localhost;
root /vagrant;
index index.php index.html index.htm;
location / {
try_files $uri $uri $uri/ =404;
@sogko
sogko / app.js
Last active February 21, 2025 08:34
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@liabru
liabru / save-file-local.js
Created April 24, 2014 17:46
Save a text file locally with a filename, by triggering a download in JavaScript
/*
* Save a text file locally with a filename by triggering a download
*/
var text = "hello world",
blob = new Blob([text], { type: 'text/plain' }),
anchor = document.createElement('a');
anchor.download = "hello.txt";
anchor.href = (window.webkitURL || window.URL).createObjectURL(blob);
@vsajip
vsajip / pyvenvex.py
Last active March 3, 2026 15:37
A script which demonstrates how to extend Python 3.3's EnvBuilder, by installing setuptools and pip in created venvs. This functionality is not provided as an integral part of Python 3.3 because, while setuptools and pip are very popular, they are third-party packages.The script needs Python 3.3 or later; invoke it using"python pyvenvex.py -h"fo…
#
# Copyright (C) 2013-2020 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve