Skip to content

Instantly share code, notes, and snippets.

View TPXP's full-sized avatar
🔧
Let's fix it!

Thomas P. TPXP

🔧
Let's fix it!
View GitHub Profile
@TPXP
TPXP / @adminjs+typeorm+2.0.0.patch
Created August 16, 2021 15:16
AdminJS Typeorm Active Record support
diff --git a/node_modules/@adminjs/typeorm/lib/Database.js b/node_modules/@adminjs/typeorm/lib/Database.js
index 01d0fcc..3ad852d 100644
--- a/node_modules/@adminjs/typeorm/lib/Database.js
+++ b/node_modules/@adminjs/typeorm/lib/Database.js
@@ -12,7 +12,9 @@ class Database extends adminjs_1.BaseDatabase {
const resources = [];
// eslint-disable-next-line no-restricted-syntax
for (const entityMetadata of this.connection.entityMetadatas) {
- resources.push(new Resource_1.Resource(entityMetadata.target));
+ resources.push(new Resource_1.Resource(
diff --git a/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java b/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java
index ab869cf..e37d88d 100644
--- a/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java
+++ b/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java
@@ -2,6 +2,7 @@ package com.reactnativecommunity.webview;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
+import android.app.Activity;
import android.app.DownloadManager;
@TPXP
TPXP / conver.js
Created June 22, 2020 14:15
PHPass 64-encoding conversion
const phpassbase64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
const base64translate = (input) => {
const res = [0];
let currentBit = 0, index = 0;
input.split('').forEach(l => {
const i = phpassbase64.indexOf(l);
res[index] += (i << currentBit) & 0xff;
currentBit += 6;
if(currentBit >= 8) {
@TPXP
TPXP / package.json
Last active April 17, 2017 17:05
A simple test case to show a bug with connecting to secure servers when using an old version of faye-websocket
{
"name": "websocket-bug",
"version": "0.0.1",
"description": "A simple test case to show a bug with connecting to secure servers while using an old version of faye-websocket",
"main": "test.js",
"dependencies": {
"faye-websocket": "^0.9.4"
},
"devDependencies": {},
"scripts": {
@TPXP
TPXP / meteor_1331_arm.patch
Last active June 19, 2016 14:49
Meteor 1.3.3.1 ARM patch
diff --git a/meteor b/meteor
index 4472075..b90d02c 100755
--- a/meteor
+++ b/meteor
@@ -23,8 +23,7 @@ elif [ "$UNAME" = "Linux" ] ; then
ARCH="$(uname -m)"
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then
echo "Unsupported architecture: $ARCH"
- echo "Meteor only supports i686 and x86_64 for now."
- exit 1