Skip to content

Instantly share code, notes, and snippets.

@idoop
idoop / Makefile
Created November 17, 2021 10:20
GattLib as OpenWRT package
#
# Copyright (C) 2020-2030 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# Author: Chen Yang <idoop@msn.cn>
# Github: https://github.com/idoop
include $(TOPDIR)/rules.mk
@stek29
stek29 / 0webosbrew-letsencrypt-ca.md
Last active April 28, 2024 11:20
fix webOS ca certificates for DST Root X3 expiry (on rooted TVs)

HowTo

  • Root via rootmy.tv
  • Install

Tested on webOS 4.5, should at least on webOS 3.5+

Installation/Update

curl -qs "https://gist.githubusercontent.com/stek29/761232c6f7e1ffbc36b98da2a3a0f4d9/raw/install.sh?$(date +%s)" | sh -
@baymaxium
baymaxium / content.md
Created October 18, 2017 09:12
趣味解析,斗鱼直播大数据的玩法儿

原文:CSDN大数据

↑ 点击上方蓝字关注我们,和小伙伴一起聊技术!

作者 | 吴瑞诚

文章来源GitChat,CSDN独家合作发布,点击「阅读原文」查看交流实录

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 28, 2024 11:17
set -e, -u, -o, -x pipefail explanation
@mmistakes
mmistakes / markdown-img-picture-replacement.rb
Last active April 28, 2024 11:16
Jekyll plugin to replace Markdown images eg. `![description](image.jpg)` with `{% picture %}` tag
# Description: Jekyll plugin to replace Markdown image syntax with {% picture %} tag for crafting responsive images
# place in /_plugins/
Jekyll::Hooks.register :posts, :pre_render do |post, payload|
docExt = post.extname.tr('.', '')
# only process if we deal with a markdown file
if payload['site']['markdown_ext'].include? docExt
newContent = post.content.gsub(/\!\[(.+)\]\((.+)\)/, '{% picture default \2 alt="\1" %}')
post.content = newContent
end
@ardakazanci
ardakazanci / RulerView.kt
Created April 28, 2024 06:15
RulerView - Jetpack Compose
@Composable
fun RulerView(
startValue: Int,
endValue: Int,
step: Int
) {
val density = LocalDensity.current
val scrollState = rememberScrollState()
val sectionWidth = 80.dp
var sliderValue by remember { mutableFloatStateOf(0.5f) }
@fanaugen
fanaugen / workflow.scpt
Last active April 28, 2024 11:13
Automator workflow to batch-convert MS Word documents (.doc, .docx) into PDF using Apple Pages
(*
* embed this applescript into an Automator workflow to batch-convert
* MS Word documents (.doc, .docx) into PDF using Apple Pages.
*)
on run {input, parameters}
tell application "Pages"
activate
repeat with doc in input
@Studiodews
Studiodews / getting-remote-json-data-with-the-fetch-api.markdown
Created August 13, 2020 19:03
Getting remote JSON data with the fetch API
@vanruch
vanruch / gist:988c6175469e010d4c3c16092cd85477
Last active April 28, 2024 11:06
Unlocking tSQD from the deprecated GatewayRegistry contract

Unlocking tSQD from the deprecated GatewayRegistry contract

  1. Go to arbiscan
  2. Click "Connect to Web3" button to connect your MetaMask or WalletConnect wallet
  3. Make sure you are connected to the arbitrum-sepolia network with the same account that was used to register the gateway
  4. Find and execute 23. unstake method
  5. In case of an error, it's possible that the tokens are still locked

The tokens should be transferred back to you afterwards

@carlessanagustin
carlessanagustin / install_docker_rh.sh
Last active April 28, 2024 11:06
Install Docker Engine & Docker Compose in RedHat based Linux Distribution
#!/usr/bin/env bash
DOCKERCOMPOSE_VERSION=1.25.0
# Docker Engine Community Edition
yum remove \
docker \
docker-client \
docker-client-latest \