This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <title> vibe images <!-- change this to whatever you want! --> </title> | |
| <!-- Add any text here if you so desire; the images won't be drawn over it. --> | |
| <div id="container"> | |
| </div> | |
| <script> | |
| function shuffleArray(array) { | |
| for (let i = array.length - 1; i > 0; i--) { | |
| const j = Math.floor(Math.random() * (i + 1)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "formula" | |
| require_relative "lib/private_strategy" | |
| class Hoge < Formula | |
| homepage "https://github.com/yourcompany/hoge" | |
| url "https://github.com/yourcompany/hoge/releases/download/v0.1.0/hoge_v0.1.0_darwin_amd64.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy | |
| sha256 "6de411ff3e4b1658a413dd6181fcXXXXXXXXXXXXXXXXXXXX" | |
| head "https://github.com/yourcompany/hoge.git" | |
| version "0.1.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| go func() { | |
| for { | |
| err = rmq.Stream(cancelCtx) | |
| if errors.Is(err, rabbitmq.ErrDisconnected) { | |
| continue | |
| } | |
| break | |
| } | |
| }() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # (c) 2020 Humu | |
| # MIT License | |
| from typing import Any | |
| import github | |
| AUTOMERGE_LABEL_NAME = 'automerge' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Middleware that removes additional meaningless backslashes. | |
| This transforms URLs as follows: | |
| - yourwebsite.com// to yourwebsite.com | |
| - yourwebsite.com/section/// to yourwebsite.com/section | |
| Ideally, this middleware should be placed before Commonmiddleware to avoid | |
| conflicts with APPEND_SLASH. However, this code already appends final slash | |
| if APPEND_SLASH is set to TRUE trying to reduce one additional redirect. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function dots(width, height, density) { | |
| for (let i = 0; i < density; i += 1) { | |
| createDot( | |
| Math.floor(Math.random() * width), | |
| Math.floor(Math.random() * height), | |
| ); | |
| } | |
| } | |
| function createDot(x, y) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| io.on('connection', function(socket){ | |
| /* 'connection' is a special event fired on the server when any new connection is made */ | |
| }) | |
| socket.on('disconnect', function(){ | |
| /* When this individual socket has disconnected, this special event fires */ | |
| }) | |
| /* This will send the event 'foobar' with the data to | |
| every connected to socket */ |
#Webpack + ES6 + Sass + Live reload
Basic example of webpack config to work with sass, es6 and live reload.
To get live reload working you need:
- get package.json and webpack.config.js to your project foldee
- run in terminal npm install
- add this script <script src="http://localhost:35729/livereload.js"></script> to your index.html
- create src folder and src files
- run in terminal webpack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfcontent type="text/html; charset=UTF-8"> | |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <title>Sanitize target="_blank"</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| /* 3/24/2017 Sanitize_Target_Blank.htm https://gist.github.com/JamoCA/80f65eb07f054b1326221bd4f15868d6 */ | |
| function sanitizeTargetBlank(){ | |
| $('#linkDiv a[rel~=external]').prop('target', '_blank'); |
NewerOlder