Skip to content

Instantly share code, notes, and snippets.

@Rarst
Rarst / r-debug.php
Last active June 12, 2025 01:56
R Debug (set of dump helpers for debug)
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/
@paulgregg
paulgregg / README.md
Last active April 22, 2025 03:02
Converting a gitlab export to simple git repo

Converting a gitlab export to simple git repo

Gitlab exports a tar.gz file which contains a file called project.bundle. We can convert this file into a normal git repo using the following steps:

Extract the project.bundle file

$ tar xvfz GitLabExport.gz
---
Missing data - rows
---
# Check how many values are missing in the category_desc column
print(volunteer["category_desc"].isnull().sum())
# Subset the volunteer dataset
volunteer_subset = volunteer[volunteer["category_desc"].notnull()]
# Print out the shape of the subset
@vidit0210
vidit0210 / Feature Engineering for Machine Learning in Python-DataCamp
Created March 1, 2020 17:02
Feature Engineering for Machine Learning in Python-dataCamp
----
Selecting specific data types
----
# Create subset of only the numeric columns
so_numeric_df = so_survey_df.select_dtypes(include=['int', 'float'])
# Print the column names contained in so_survey_df_num
print(so_numeric_df.columns)
---
One-hot encoding and dummy variables
@Snarp
Snarp / google-docs-copy.js
Last active September 24, 2025 05:14
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@szepeviktor
szepeviktor / Wistia-download-videos.md
Last active October 27, 2025 16:56
Download Wistia videos - Please do not misuse it!

Download Wistia videos

  1. right-click on the playing video, select Copy link
  2. find Wistia video ID in the copied link e.g. wvideo=tra6gsm6rl
    • alternative: look for e.g. hashedId=tra6gsm6rl in the page source
  3. load http://fast.wistia.net/embed/iframe/ + video ID in your browser
  4. look for "type":"original" in the page source and copy the URL from the next line e.g. "url":"http://embed.wistia.com/deliveries/129720d1762175bcd8e06dcab926ec76ad38ff00.bin"
  • alternative: look for "type":"hd_mp4_video"
@apankrat
apankrat / check-certs-expiry.sh
Last active June 4, 2024 16:57
Bulk-check expiry dates and issuers of website SSL certificates
#! /bin/bash
#
# add your sites here, one per line
# prepend # to temporarily exclude an entry
#
sites="
reddit.com
google.com
microsoft.com
@timothycarambat
timothycarambat / index.html
Last active January 12, 2024 17:43
Basic Web3 login, store login eth address, and read public variable from a smart contract
<head>
<link
href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/web3/1.6.1/web3.min.js"
integrity="sha512-5erpERW8MxcHDF7Xea9eBQPiRtxbse70pFcaHJuOhdEBQeAxGQjUwgJbuBDWve+xP/u5IoJbKjyJk50qCnMD7A=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
@mheers
mheers / README.md
Created March 22, 2022 14:47 — forked from paulgregg/README.md
Converting a gitlab export to simple git repo

Converting a gitlab export to simple git repo

Gitlab exports a tar.gz file which contains a file called project.bundle. We can convert this file into a normal git repo using the following steps:

Extract the project.bundle file

$ tar xvfz GitLabExport.gz
@cld4h
cld4h / README.md
Last active April 10, 2025 04:59
Bypass the GFW; clash fake-ip and tproxy; iptables and transparent proxy on Linux; 在Linux上通过 iptables 以及 clash 配置透明代理用于本机及局域网翻墙网关; Linux 翻墙路由器配置

This article show you the ultimate way to set up a transparent proxy on Linux using clash and iptables to bypass the GFW in China.

We use:

You can go to github gist to download all files mentioned in this article.