Skip to content

Instantly share code, notes, and snippets.

View thaewrapt's full-sized avatar
💭
Keep calm and support Ukraine.

Alexey Ugnichev thaewrapt

💭
Keep calm and support Ukraine.
View GitHub Profile
@manwar
manwar / taint-in-perl.md
Created September 8, 2024 11:37
How to handle taint in Perl?

In Perl, we can turn on special security check when deailing with external data.

Here is an example (taint-check.pl) where we get the file path from user as command line input.

#!/usr/bin/perl
   
use v5.38;

my $file = $ARGV[0];
@joshuakraemer
joshuakraemer / instructions.md
Last active January 31, 2025 20:30
How to install Windows Media Player 11 to a Proton prefix
  1. Download Windows Media Player 11, 64 bit (wmp11-windowsxp-x64-enu.exe):
    $ cd /tmp/
    $ curl -O https://web.archive.org/web/20190512112704/https://download.microsoft.com/download/3/0/8/3080C52C-2517-43DE-BDB4-B7EAFD88F084/wmp11-windowsxp-x64-enu.exe
  2. Extract the archive:
    $ cabextract wmp11-windowsxp-x64-enu.exe -d wmp11
  3. Run and close the game through Steam. A Proton prefix is created on the first run.
  4. Go to the game's folder inside Steam's compatdata folder:
    $ cd $HOME/.local/share/Steam/steamapps/compatdata/287290
  5. Set prefix to Windows XP: $ WINEPREFIX=$PWD/pfx wine winecfg
@bazad
bazad / build-xnu-4903.241.1.sh
Created September 13, 2019 21:11
A script to build XNU version 4903.241.1 (macOS High Sierra 10.14.3) on macOS 10.14.6 with Xcode 9.4.1.
#! /bin/bash
#
# build-xnu-4903.241.1.sh
# Brandon Azad
#
# A script showing how to build XNU version 4903.241.1 (which corresponds to
# macOS 10.14.3) on macOS High Sierra 10.14.6 with Xcode 9.4.1.
#
# Note: This process will OVERWRITE files in Xcode's MacOSX10.13.sdk. Make a
# backup of this directory first!
@rjhansen
rjhansen / keyservers.md
Last active April 22, 2025 21:49
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@segabor
segabor / gist:cd08eae2ce8717a1e4f8476687d98221
Created September 4, 2018 08:59
Build Swift 4.2-dev on Arch Linux
#!/bin/bash
# Build Swift on Arch Linux
# Original post I followed https://akrabat.com/compiling-swift-on-linux/.
# [1] Checking out repo
mkdir swift-dev
cd swift-dev/
git clone [email protected]:apple/swift.git
@crgimenes
crgimenes / stringToReaderCloser.go
Last active March 11, 2025 06:14
string to io.ReadCloser
package main
import (
"bytes"
"fmt"
"io"
"os"
"strings"
)
@briancroom
briancroom / Swift.md
Last active February 6, 2024 18:26
How to create a Swift modular library

I am trying to determine if it is possible to build a Swift dynamic library which is itself composed of one of more private modules, without needing to expose to that fact to outside users. My hope was that I could build the private module as a static library, which would be linked into the primary (dynamic) library. The dylib could then be deployed together with its swiftmodule and swiftdoc and be imported, with the private module and its symbols not being exposed at all.

Unfortunately, what I'm currently observing seems to indicate that the private module's swiftmodule also has to be available for the primary library to be successfully imported.

This can be reproduced as follows. I have the following directory structure:

./Greeter/Logger/Logger.swift:

public func log(_ message: String) {
@derhuerst
derhuerst / output.js
Created May 10, 2016 10:22
how fetch a GitHub user's stars
[
{
owner: 'bcoe',
repo: 'top-npm-users',
description: ':star: Generate a list of top npm users by based on monthly downloads.',
language: 'JavaScript',
isFork: false,
stargazers: 27,
watchers: 27
}
@kode54
kode54 / PKGBUILD
Last active August 24, 2016 19:45
Arch Linux AUR PKGBUILD for mesa-git
# Maintainer: Kristian Klausen <[email protected]>
# Contributor: Egon Ashrafinia <[email protected]>
# Contributor: Tavian Barnes <[email protected]>
# Contributor: Jan de Groot <[email protected]>
# Contributor: Andreas Radke <[email protected]>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Antti "Tera" Oja <[email protected]>
# Contributor: Diego Jose <[email protected]>
# Credits to maintainers of mesa in extra!
@dz0ny
dz0ny / Capfile.rb
Created May 5, 2012 19:29
FTP Sync for Capistrano
load 'config/deploy'
desc "FTP Sync"
namespace :deploy do
desc "Sync and compile to remote by default"
task :default do
#assets.sprite
#assets.compile
remote.default