Skip to content

Instantly share code, notes, and snippets.

View terwer's full-sized avatar
I may be slow to respond.

terwer terwer

I may be slow to respond.
View GitHub Profile
tdcosta100 /
Last active July 18, 2024 10:13
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc


If you want to use pure WSLg, you can try the new WSLg tutorial.

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server.

For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

DerFichtl /
Last active February 10, 2024 10:40
Tampermonkey Adblock Script - This Ad-Blocker is running on pages with Adblock-detectors and can remove or click elements to cleanup before you start browsing.
layout title published tags
Tampermonkey ad-blocker

This ad-blocker script for Tampermonkey won't trigger an adblock-block / adblock-detector script and so you could use it for pages that are annoying you with "please turn of your adblock" messages. It's just hiding the ads and don't try to intercept the requests or remove the ads at all. So it don't make the websites faster, but it makes them cleaner and easier to read.

This script is not a generic solution and has to be configured for every website it should clean up. I don't provide configs for pages, just use your browser developer-tools to find the elements you want remove or click.

fworks /
Last active July 2, 2024 08:16
Zsh / Oh-my-zsh on Windows Git Bash
dev-jonghoonpark / index.html
Last active December 6, 2018 13:25
'simplemde-markdown-editor' with 'mathjax'
<link rel="stylesheet" href="">
<script src=""></script>
<script type="text/javascript" src=""></script>
<script src="" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
$(function () {
mburakerman / package.json
Last active September 26, 2022 17:32
Webpack 4 config.js (SCSS to CSS and Babel) 👌 The Simplest Usage 👌
"name": "webpack-sass",
"version": "1.0.0",
"scripts": {
"start": "webpack-dev-server --open --mode development",
"build": "webpack -p"
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
52cik /
Last active July 14, 2024 15:06
npm 淘宝镜像配置
npm set registry # 注册模块镜像
npm set disturl # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set sass_binary_site # node-sass 二进制包镜像
npm set electron_mirror # electron 二进制包镜像
npm set ELECTRON_MIRROR # electron 二进制包镜像
npm set puppeteer_download_host # puppeteer 二进制包镜像
npm set chromedriver_cdnurl # chromedriver 二进制包镜像
npm set operadriver_cdnurl # operadriver 二进制包镜像
gokulkrishh / media-query.css
Last active July 16, 2024 10:52
CSS Media Queries for Desktop, Tablet, Mobile.
##Device = Desktops
##Screen = 1281px to higher resolution desktops
@media (min-width: 1281px) {
/* CSS */
pankaj28843 / Make soffice command of Libreoffice work on Mac OS
Last active August 19, 2023 10:28
Make soffice command of Libreoffice work on Mac OS X

Quick Start

sudo curl > /usr/local/bin/soffice && sudo chmod +x /usr/local/bin/soffice

Create an bash script at /usr/local/bin/soffice with following content


# Need to do this because symlink won't work
cabeca / simulator_populator
Created September 23, 2014 21:30
This script removes and recreates all simulators in Xcode 6.
#!/usr/bin/env ruby
device_types_output = `xcrun simctl list devicetypes`
device_types = device_types_output.scan /(.*) \((.*)\)/
runtimes_output = `xcrun simctl list runtimes`
runtimes = runtimes_output.scan /(.*) \(.*\) \(([^)]+)\)$/
devices_output = `xcrun simctl list devices`
devices = devices_output.scan /\s\s\s\s(.*) \(([^)]+)\) (.*)/
// UIButtonBox.h
// Created by Jose Antonio Lopez on 28/11/13.
// Copyright (c) 2014 Asenit Technologies SL. All rights reserved.
#import <UIKit/UIKit.h>
@interface UIButtonBox : UIButton