Skip to content

Instantly share code, notes, and snippets.

Please go to https://github.com/nishuzumi/gemini-teacher
@gavvvr
gavvvr / Jenkinsfile
Last active May 20, 2025 10:44
Simple text file templates using Jenkins pipeline
// Just an example, for Rails config better use embedded ERB
final DATABASE_YAML_TEMPLATE = '''
test:
adapter: oracle_enhanced
database: app_db
username: ${user}
password: ${password}
'''
final CFG_PATH = 'config/database.yml'
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active September 27, 2025 23:41
Docker Container Logging using Promtail
@stefanmaric
stefanmaric / copy-to-clipboard-bookmarklet.md
Created September 7, 2016 20:54
Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard

Copy-to-clipboard Bookmarklet

Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard.

This is the base javascript:

(function (text) {
  var node = document.createElement('textarea')
  var selection = document.getSelection()
anonymous
anonymous / gist:0ed951c9abeb51b4b9d5
Created December 24, 2014 13:39
程序实例
publicclassId18 {
int[] weight={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2}; //十七位数字本体码权重
char[] validate={ '1','0','X','9','8','7','6','5','4','3','2'}; //mod11,对应校验码字符值
publicchargetValidateCode(String id17){
@JosefJezek
JosefJezek / cisco-anyconnect-profile.md
Created July 2, 2014 11:00
Cisco AnyConnect VPN Profile

Cisco AnyConnect VPN Profile

Router IOS

webvpn import svc profile profile-example usbflash0:example.xml
webvpn context ctx-example
policy group vpn-group-example
svc profile profile-example
@kaka19ace
kaka19ace / upyun_sdk_update_cache.py
Last active August 29, 2015 13:58
又拍云 python sdk 添加更新缓存的接口
# 又拍云 python sdk 添加更新缓存的接口
def update_cache(self, urls):
"""
>>> url1 = "http://kaka.b0.upaiyun.com/kaka_001.flv"
>>> url2 = "http://kaka.b0.upaiyun.com/kaka_002.flv"
>>> urls = [url1, url2]
>>> res = up.update_cache(urls)
>>> return tuple (status, content)
"""
@thykka
thykka / live.js
Created March 23, 2014 18:46
live.js - auto reload browser on content change
/*
Live.js - One script closer to Designing in the Browser
Written for Handcraft.com by Martin Kool (@mrtnkl).
Version 4.
Recent change: Made stylesheet and mimetype checks case insensitive.
http://livejs.com
http://livejs.com/license (MIT)
@livejs
@dawn110110
dawn110110 / pyftp.py
Created December 30, 2013 16:12
pyftpdlib. server in one file.
#!/usr/bin/env python
# ftpserver.py
#
# pyftpdlib is released under the MIT license, reproduced below:
# ======================================================================
# Copyright (C) 2007 Giampaolo Rodola' <g.rodola@gmail.com>
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and