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
# Adapted From: https://github.com/puppeteer/puppeteer/blob/main/docker/Dockerfile | |
# Worked with V15 | |
FROM node:18.12.0-slim | |
# FROM ghcr.io/puppeteer/puppeteer:16.1.0 | |
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) | |
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer | |
# installs, work. | |
RUN apt-get update \ |
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
alias xc="open *.xcworkspace || open *.xcodeproj" |
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
$curl http://pokeapi.co/api/v2/pokemon/?limit=3 | |
// Models... | |
struct PokemonListResult: Codable { | |
let count: Int? | |
let previous: URL? | |
let results: [PokemonIndex]? | |
let next: URL? | |
} |
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
@interface UIApplication(InternalAppAdditions) | |
- (void)terminateWithSuccess; | |
@end | |
#warning: This is private API. Do not try to submit this line to TestFlight or the App Store. | |
[[UIApplication sharedApplication] terminateWithSuccess]; |
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
words = '/usr/share/dict/words' | |
with open(words, encoding="utf-8") as file: | |
my_list = file.readlines() | |
my_list = [x.strip() for x in my_list] | |
for rows in my_list: | |
if rows[0:3] == 'con': | |
print("s"+rows) |
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
// In the extension JS | |
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { // Fetch the current tab | |
chrome.tabs.sendMessage(tabs[0].id, {message: "preach", preachText: usrMessage}); | |
}); | |
// In the context script | |
chrome.runtime.onMessage.addListener( | |
function(request, sender, sendResponse) { | |
if (request.message == "preach"){ // Filter out other messages | |
alert(request.preachText, 5000); |
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
"content_scripts": [ | |
{ | |
"matches": [ | |
"*://*/*" //Run on every page | |
], | |
"js": [ | |
"content-script.js" | |
], | |
"run_at": "document_end" | |
} |
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
package com.carnivalmobile.webviewhack; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.os.Bundle; | |
import android.webkit.WebView; | |
import com.carnival.sdk.MessageActivity; | |
public class UserAgentHack implements Application.ActivityLifecycleCallbacks { |
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
def master do | |
IO.puts "Beginning" | |
parent = self | |
spawn(fn -> worker(parent) end) | |
master_listener | |
end | |
def master_listener do | |
IO.puts "listening" | |
parent = self |
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
@doc """ | |
This returns a new list with the function applied to the list supplied. | |
Examples: | |
iex> Misc.pmap([1,2,3,4], fn(n) -> n * n end) | |
[1,4,9,16] | |
iex> Misc.pmap([1,2,3,4], fn(n) -> n + 1 end) | |
[2,3,4,5] | |
""" |
NewerOlder