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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cards.notification"> | |
<uses-sdk | |
android:minSdkVersion="17" | |
android:targetSdkVersion="17" /> | |
<application | |
android:allowBackup="true" |
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 { useMemo, useReducer, useRef } from "react"; | |
const useGetState = (initialState) => { | |
const state = useRef(initialState); | |
const [, update] = useReducer(num => ((num + 1) % 1_000_000), 0); | |
return useMemo(() => ([ | |
() => state.current, | |
(newState) => { | |
state.current = newState; |
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
exports.config = { | |
seleniumAddress: 'http://localhost:4444/wd/hub', | |
capabilities: { | |
'browserName': 'chrome' | |
}, | |
specs: ['example-spec.js'], | |
jasmineNodeOpts: { |
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/bash | |
if [ $# -lt 5 ]; then | |
echo -e "./send_sms.sh <device> <to_number> <big|small> <number_of_texts> [sleep_time]" | |
exit 0 | |
fi | |
if [ $5 -ge 500 ]; then | |
while true; do | |
read -p "Are you sure you want to send >500 texts? y/n`echo $'\n> '`" yn |
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 { ipcMain } from 'electron' | |
import uuid from 'uuid' | |
/** | |
* Makes a data request over IPC to renderer process | |
* @param {string} request Request type known to main handler | |
* @param {object} Optional `options` object used as parameters for request | |
* @return {Promise} Promise of data | |
*/ | |
export function call(window, request, options={}) { |
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/bash | |
curl=/usr/local/opt/curl/bin/curl | |
openssl=/usr/local/opt/openssl/bin/openssl | |
deviceToken=TOKEN | |
authKey="./AuthKey_##########.p8" | |
authKeyId=########## | |
teamId=########## |
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 {app,Notification} = require('electron') | |
app.on('ready', () => { | |
showNextNotification() | |
}) | |
let i = 0 | |
showNextNotification = () => { | |
const notification = new Notification({ |
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 { ipcMain } from 'electron' | |
import uuid from 'uuid' | |
/** | |
* Makes a data request over IPC to renderer process | |
* @param {string} request Request type known to main handler | |
* @param {object} Optional `options` object used as parameters for request | |
* @return {Promise} Promise of data | |
*/ | |
export function call(window, request, options={}) { |
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 { | |
app, | |
dialog, | |
shell | |
} from 'electron' | |
import os from 'os' | |
import childProcess from 'child_process' | |
import sudo from 'sudo-prompt' | |
import path from '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
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
NewerOlder