Some notes and techniques for reverse engineering Webpack (and a little bit about React/Vue/Angular) apps.
import { PrismaClient } from '@prisma/client'; | |
import type { User } from '@prisma/client'; | |
import { createPool, sql } from 'slonik'; | |
export const buildBaseConnectionURL = (config) => { | |
return ( | |
'postgresql://' + | |
config.DB_USER + | |
':' + | |
config.DB_PASS + |
@objc protocol ExampleActions: AnyObject { | |
func pushUIKitViewController() | |
} | |
struct ExampleView: View { | |
@FirstResponder private var firstResponder | |
var body: some View { | |
Button { | |
firstResponder.sendAction(#selector(ExampleActions.pushUIKitViewController)) |
#!/usr/bin/env bash | |
echo " | |
---------------------- | |
NODE & NPM | |
---------------------- | |
" | |
# add nodejs LTS ppa (personal package archive) from nodesource | |
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - |
I always seem to forget how to download the macOS version I need by the time I need it again, so here is a quick and nasty guide on how to download a properly signed *.dmg
file to build a USB installer.
- The script below is just copy pasted from here: https://github.com/grahampugh/macadmin-scripts (This is a jacked up version of the original found here: https://github.com/munki/macadmin-scripts)
- Here is some nice documentation to use the script: https://derflounder.wordpress.com/2018/02/27/using-installinstallmacos-py-to-download-macos-high-sierra-installers/
If you don't want to download the tool or monkey around with permissions, give this a shot: (Provided you are dumb enough to pipe unknown code off the internet in sudo python
of course):
sudo curl -s https://raw.githubusercontent.com/grahampugh/macadmin-scripts/master/installinstallmacos.py | sudo python - --help
If you're downloading an installer for your current machine, do the following:
Ops. https://gitlab.com': terminal prompts disabled
Ops. Username for 'https://codeberg.org':
Ops. etc
If you see this message, there is a short solution how to fix it here. In my case it appeared and it did not want to get fixed by many ways that are offered on the internet.
Some of the pieces of advice that did not work:
- Set
git config --global --add credential.helper manager
// This file is based largely on the Runtime package - https://github.com/wickwirew/Runtime | |
extension KeyPath { | |
var fieldName: String? { | |
guard let offset = MemoryLayout<Root>.offset(of: self) else { | |
return nil | |
} | |
let typePtr = unsafeBitCast(Root.self, to: UnsafeMutableRawPointer.self) | |
let metadata = typePtr.assumingMemoryBound(to: StructMetadata.self) |
<!DOCTYPE html> | |
<head> | |
<title>$title</title> | |
<meta property="og:site_name" content="$site_name"> | |
<meta property="og:description" content="$description"> | |
<meta property="article:author" content="$author"> | |
<!-- $image_url / link preview image is set using og:image property --> | |
<!-- <meta property="og:image" content="http://example.com/img.jpeg"> --> | |
<meta property="telegram:channel" content="@cor_bee"> |
# Get the latest version of pushgateway from prometheus.io, then download and extract: | |
$ wget https://github.com/prometheus/pushgateway/releases/download/v0.8.0/pushgateway-0.8.0.linux-amd64.tar.gz | |
$ tar -xvf pushgateway-0.8.0.linux-amd64.tar.gz | |
# Create the pushgateway user: | |
$ useradd --no-create-home --shell /bin/false pushgateway | |
# Move the binary in place and update the permissions to the user that we created: | |
$ cp pushgateway-0.8.0.linux-amd64/pushgateway /usr/local/bin/pushgateway | |
$ chown pushgateway:pushgateway /usr/local/bin/pushgateway |