Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
#include "fpsitem.h" | |
#include <QElapsedTimer> | |
FPSItem::FPSItem(QQuickItem *parent) | |
: QQuickItem(parent) | |
, m_averageMsPerFrame(0) | |
{ | |
setFlag(ItemHasContents); | |
} |
import React, {Component} from "react"; | |
import cx from 'classnames'; | |
import vjs from 'video.js'; | |
import _ from 'lodash'; | |
import ReactDOM from 'react-dom'; | |
const DEFAULT_HEIGHT = "100%"; | |
const DEFAULT_WIDTH = "100%"; | |
const DEFAULT_ASPECT_RATIO = (9 / 16); | |
const DEFAULT_ADJUSTED_SIZE = 0; |
var restify = require('restify'); | |
// Authentication | |
var passport = require('passport'); | |
var LocalStrategy = require('passport-local').Strategy; | |
var sessions = require("client-sessions"); | |
var server = restify.createServer(); | |
server.use(restify.queryParser()); | |
server.use(restify.bodyParser()); |
diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb | |
index db9a34a..e95b882 100644 | |
--- a/node_modules/react-native/scripts/react_native_pods.rb | |
+++ b/node_modules/react-native/scripts/react_native_pods.rb | |
@@ -165,7 +165,7 @@ def use_react_native_codegen!(spec, options={}) | |
return if ENV['DISABLE_CODEGEN'] == '1' | |
# The path to react-native (e.g. react_native_path) | |
- prefix = options[:path] ||= File.join(__dir__, "..") | |
+ prefix = options[:path] ||= "../../node_modules/react-native" |
// Restores old tab bar in Safari 15.0 (16612.1.29.41.4, 16612) | |
// clang -fmodules -shared -Wall -Os -o libsafariinject.dylib safariinject.m | |
// | |
// If SIP off: | |
// DYLD_INSERT_LIBRARIES=$PWD/libsafariinject.dylib /Applications/Safari.app/Contents/MacOS/Safari | |
// | |
// If SIP on, you can demo this by manually removing Safari's code signing signature, but many | |
// features (eg saved logins) won't be readable by the resigned app: | |
// cp -a /Applications/Safari.app ./ | |
// codesign --remove Safari.app/Contents/MacOS/Safari |
extension CVPixelBuffer | |
{ | |
/// Deep copy a CVPixelBuffer: | |
/// http://stackoverflow.com/questions/38335365/pulling-data-from-a-cmsamplebuffer-in-order-to-create-a-deep-copy | |
func copy() -> CVPixelBuffer | |
{ | |
precondition(CFGetTypeID(self) == CVPixelBufferGetTypeID(), "copy() cannot be called on a non-CVPixelBuffer") | |
var _copy: CVPixelBuffer? |
// This optional code is used to register a service worker. | |
// register() is not called by default. | |
// This lets the app load faster on subsequent visits in production, and gives | |
// it offline capabilities. However, it also means that developers (and users) | |
// will only see deployed updates on subsequent visits to a page, after all the | |
// existing tabs open on the page have been closed, since previously cached | |
// resources are updated in the background. | |
// To learn more about the benefits of this model and instructions on how to |
/* | |
RUN THE SCRIPT BY YOURSELF: | |
- Run `node paddle-revenue.js` on your server and let it run 24/7. | |
- Access the API at http://your_server_ip:8175/ (JSON) | |
HOSTED VERSION: | |
If you don't want to run the script by your own, you can use the | |
hosted version. The price is $5 per month per Paddle account. | |
Here is how: |
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User | |
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User | |
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User | |
[ | |
{ | |
"button": "button1", | |
"count": 1, | |
"modifiers": ["ctrl"], | |
"press_command": "drag_select", |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');