Skip to content

Instantly share code, notes, and snippets.

@Maumagnaguagno
Maumagnaguagno / .travis.yml
Last active February 18, 2020 00:02
Make Travis-CI push files to other repositories for you when tests pass
language: ruby
rvm:
- 2.0.0
env:
global:
- USER="username"
- EMAIL="username@mail.com"
- REPO="name of target repo"
- FILES="README.md foo.txt bar.txt"
- GH_REPO="github.com/${USER}/${REPO}.git"
@keithweaver
keithweaver / get-json.py
Created March 10, 2017 03:47
Get JSON file with Python
import json
def getJSON(filePathAndName):
with open(filePathAndName, 'r') as fp:
return json.load(fp)
# Example of returning just JSON
# jsonFile = getJSON('./test.json') # Uncomment this line
# It gets returned as a dictionary.
@Richienb
Richienb / index.js
Last active June 30, 2020 06:58
internalIp.v4() for browsers
const internalIp = async () => {
if (!RTCPeerConnection) {
throw new Error("Not supported.")
}
const peerConnection = new RTCPeerConnection({ iceServers: [] })
peerConnection.createDataChannel('')
peerConnection.createOffer(peerConnection.setLocalDescription.bind(peerConnection), () => { })
@7dir
7dir / html5polyfill
Created June 25, 2017 15:19
html5polyfill
> The No-Nonsense Guide to HTML5 Fallbacks
So here we're collecting all the shims, fallbacks, and polyfills in order to implant HTML5 functionality in browsers that don't natively support them.
The general idea is that: We, as developers, should be able to develop with the HTML5 APIs, and scripts can create the methods and objects that should exist. Developing in this future-proof way means as users upgrade, your code doesn't have to change but users will move to the better, native experience cleanly.
---
- **Looking to conditionally load these scripts (client-side), based on feature detects?**
See [**Modernizr**](http://www.modernizr.com).
@holubv
holubv / fxlib.h
Created September 21, 2016 16:21
CASIO fx-9860G SDK Library (with documentation) https://edu.casio.com/
/*****************************************************************/
/* */
/* CASIO fx-9860G SDK Library */
/* */
/* File name : fxlib.h */
/* */
/* Copyright (c) 2006 CASIO COMPUTER CO., LTD. */
/* */
/*****************************************************************/
#ifndef __FXLIB_H__
@ersinakinci
ersinakinci / electron-webpack-node-integration-false.md
Last active January 25, 2023 19:03
Making electron-webpack work with nodeIntegration: false

NOTE, April 18, 2020: I wrote this document in February 2019 when I was actively investigating Electron. I haven't used it since then and have largely forgotten what this was for or how electron-webpack works. I vaguely remember the problem, but that's it. It would appear based on the comments below that this document is still coming up in web searches but has become out of date and parts of it don't work. If anyone has specific fixes to my instructions, please leave them in the comments and I'll happily incorporate them.

Using electron-webpack without Node integration

Overview

The current version (as of 2019-02-02) of electron-webpack is set up with the assumption that your BrowserWindow instance has nodeIntegration: true. However, Electron is encouraging users to set nodeIntegration: false as a security precaution, and in the future BrowserWindows will have this setting set to false by default. Doing so now with electron-webpack throws an error because the index.html template has commonjs re

@gitaarik
gitaarik / temporary-email-address-domains
Last active May 5, 2023 00:53 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0845.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
10minutemail.net
12houremail.com
12minutemail.com
@neic
neic / pacman.tex
Created March 14, 2014 12:11
Pacman icons in TikZ
\newcommand{\ghost}[1]{\tikz[baseline=.1em,scale=.5]{
\draw [fill=#1] (0,0) -- (0,.5) arc (+180:0:.3) -- (.6,0) --
(.5,.15) -- (.4,0) -- (.3,.15) -- (.2,0) -- (.1,.15) -- cycle;
\coordinate (eye) at (360*rand:.03);
\foreach \x in {.17,.43}{
\fill[white] (\x,.5) circle[radius=.1];
\fill[black] (\x,.5) ++(eye) circle[radius=.05];
}
}}
@Richienb
Richienb / DownloadFile.vbs
Last active August 9, 2023 08:03
Download A File In Visual Basic Script (vbs)
Sub HTTPDownload( myURL, myPath )
Dim i, objFile, objFSO, objHTTP, strFile, strMsg
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set objFSO = CreateObject( "Scripting.FileSystemObject" )
If objFSO.FolderExists( myPath ) Then
strFile = objFSO.BuildPath( myPath, Mid( myURL, InStrRev( myURL, "/" ) + 1 ) )
ElseIf objFSO.FolderExists( Left( myPath, InStrRev( myPath, "\" ) - 1 ) ) Then
strFile = myPath
Else
WScript.Echo "ERROR: Target folder not found."