This file contains 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 setGoogleDNS() { | |
CHANNEL=`route get google.com | grep interface | sed -n -e 's/^.*interface: //p'` | |
NETWORK=`networksetup -listnetworkserviceorder | grep $CHANNEL | sed -n -e 's/^.*Port: //p' | sed -n -e 's/,.*//p'` | |
echo "Setting Google's DNS on channel '$CHANNEL' for network '$NETWORK'." | |
sudo networksetup -setdnsservers $NETWORK 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844 | |
} | |
function setCloudflareDNS() { | |
CHANNEL=`route get google.com | grep interface | sed -n -e 's/^.*interface: //p'` | |
NETWORK=`networksetup -listnetworkserviceorder | grep $CHANNEL | sed -n -e 's/^.*Port: //p' | sed -n -e 's/,.*//p'` |
This file contains 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
license: gpl-3.0 | |
height: 1030 | |
scrolling: yes |
This file contains 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
const newWindow = new BrowserWindow({ | |
webPreferences: { | |
devTools: !IS_PRODUCTION | |
} | |
}); |
This file contains 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
import ffmpeg form 'fluent-ffmpeg'; | |
const filePath = '/Users/yoann/Desktop/video.avi'; | |
const route = (req, res) => { | |
res.writeHead(200, getHeaders({'Content-Type': 'video/mp4'})); | |
ffmpeg(filePath) | |
.format('mp4') | |
.addOptions([ | |
'-movflags frag_keyframe+faststart' | |
]) |
This file contains 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
const video = document.querySelector('video'); | |
video.addEventListener('error', () => { | |
switch (video.error.code) { | |
case video.error.MEDIA_ERR_DECODE: | |
case video.error.MEDIA_ERR_SRC_NOT_SUPPORTED: | |
// Video format not supported. | |
break; | |
case video.error.MEDIA_ERR_ABORTED: | |
case video.error.MEDIA_ERR_NETWORK: | |
default: |
This file contains 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
import { sign } from 'electron-osx-sign'; | |
import { PARENT_PLIST_PATH, CHILD_PLIST_PATH, DEV_PROVISIONING_PROFILE } from './config'; | |
const signApp = (appPath, pkgPath) => { | |
const resourcesPath = path.join(appPath, './Contents/Resources/'); | |
const signOpts = { | |
app: appPath, | |
platform: 'mas', | |
binaries: [ /* Here goes the list of binaries you have in your app, like the widevine plugin. */ ], | |
entitlements: PARENT_PLIST_PATH, |
This file contains 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
import { sign, flat } from 'electron-osx-sign'; | |
import { PARENT_PLIST_PATH, CHILD_PLIST_PATH, PROVISIONING_PROFILE } from './config'; | |
const signApp = (appPath, pkgPath) => { | |
const resourcesPath = path.join(appPath, './Contents/Resources/'); | |
const signOpts = { | |
app: appPath, | |
platform: 'mas', | |
binaries: [ /* Here goes the list of binaries you have in your app, like the widevine plugin. */ ], | |
entitlements: PARENT_PLIST_PATH, |
This file contains 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
convert icon_white.png -resize x1024 \ | |
-size 1024x1024 xc:transparent +swap -gravity center -composite \ | |
icon_white_1024.png |
This file contains 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
#!/bin/sh | |
#Usage: ./icons.sh ../assets/media/icon_color_1024.png ../assets/icons | |
name=$(basename "$1" ".png") | |
dir=$(cd "$(dirname "$2")"; pwd)/$(basename "$2") | |
mkdir $dir/$name.iconset | |
sips -Z 16 --out $dir/$name.iconset/icon_16x16.png $1 | |
sips -Z 32 --out $dir/$name.iconset/[email protected] $1 | |
sips -Z 32 --out $dir/$name.iconset/icon_32x32.png $1 |
This file contains 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
import unhandled from 'electron-unhandled'; | |
import mailgunInitializer from 'mailgun-js'; | |
import { APP_VERSION, MAILGUN_PRIVATE, MAILGUN_SERVER } from './config'; | |
const mailgun = mailgunInitializer(({ | |
apiKey: MAILGUN_PRIVATE, | |
domain: MAILGUN_SERVER | |
})); | |
unhandled({ |
NewerOlder