Skip to content

Instantly share code, notes, and snippets.

View funilrys's full-sized avatar
🐱
Hi, you are awesome!

Nissar Chababy funilrys

🐱
Hi, you are awesome!
View GitHub Profile
@mbrengel
mbrengel / archvbox.bat
Last active September 20, 2022 12:21
Unattended Arch Linux VM installation script for VirtualBox on Windows hosts + a toolchain for building and modifying the script.
@echo off
if NOT EXIST %HOMEDRIVE%%HOMEPATH%\vmshare (
echo shared vm folder %HOMEDRIVE%%HOMEPATH%\vmshare does not exist
exit /B
)
if NOT EXIST %HOMEDRIVE%%HOMEPATH%\arch.iso (
echo arch linux iso %HOMEDRIVE%%HOMEPATH%\arch.iso does not exist
exit /B
)
where vboxmanage > nul 2>&1
@onodai145
onodai145 / fortigate.pattern
Last active December 27, 2023 23:11
Logstash log parsing sample for FortiOS after 5.6
FORTIDATE %{YEAR:year}\-%{MONTHNUM:month}\-%{MONTHDAY:day}
MAX_BUILDS = 5
MAX_ENV_BUILDS = 2
Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.job.WorkflowJob.class).each { it ->
def job = Jenkins.instance.getItemByFullName(it.fullName, Job.class)
def limit = (it.fullName =~ /^environment/) ? MAX_ENV_BUILDS : MAX_BUILDS
def recent = job.getBuilds().limit(limit)
println "Processing job " + it.fullName + " " + it.class + " BuildCount: " + job.getBuilds().size() + " Limit: " + limit
@simonrw
simonrw / python_pymysql_notes.md
Created September 18, 2015 19:01
Notes about pymysql connections

Database transactions

pymysql

  • Defaults to autocommit=False
connection = pymysql.connect(user='user', db='test')
cursor = connection.cursor()
cursor.execute('insert into test (value) values (10)')