Skip to content

Instantly share code, notes, and snippets.

View rudolfovich's full-sized avatar

Vladimir Shestakov rudolfovich

View GitHub Profile
@inz
inz / README.mkd
Created April 19, 2011 12:56
List svn authors for easier migration to Git
def verify_sign(public_key_loc, signature, data):
'''
Verifies with a public key from whom the data came that it was indeed
signed by their private key
param: public_key_loc Path to public key
param: signature String signature to be verified
return: Boolean. True if the signature is valid; False otherwise.
'''
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
@ashrithr
ashrithr / ssh_tunneling.md
Last active August 28, 2024 14:17
ssh tunneling and port forwarding

###Single hop tunelling:

ssh -f -N -L 9906:127.0.0.1:3306 [email protected]

where,

  • -f puts ssh in background
  • -N makes it not execute a remote command
@mgreensmith
mgreensmith / Slack_solarized_themes
Last active November 18, 2024 20:05
Solarized themes for Slack
Solarized
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F
Solarized Dark
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@justbuchanan
justbuchanan / ParameterByValueVsByRef.md
Last active May 26, 2022 20:26
Performance test of passing a small struct by value vs by reference in C++

Comparison of passing a small struct by value vs by reference in C++

Below are the results from running this on my 2011 MacBook Pro with an Intel Core i7-2635QM CPU @ 2.00GHz.

With no compiler optimizations turned on:

$ make compare
time ./by-ref
 7.07 real 7.05 user 0.00 sys
@nicholasdille
nicholasdille / Show-JobProgress.ps1
Last active December 30, 2021 20:38
Retrieve progress from PowerShell job and display progress bar
function Show-JobProgress {
[CmdletBinding()]
param(
[Parameter(Mandatory,ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.Job[]]
$Job
,
[Parameter()]
[ValidateNotNullOrEmpty()]
@yohhoy
yohhoy / yuvrgb.md
Last active September 28, 2024 21:44
RGB <=> YCbCr(YPbPr) color space conversion
Y  = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
BT.601 BT.709 BT.2020
a 0.299 0.2126 0.2627
b 0.587 0.7152 0.6780
#!/bin/bash
# Jenkins Configuraitons Directory
cd $JENKINS_HOME
# Add general configurations, job configurations, and user content
git add -- *.xml jobs/*/*.xml userContent/* ansible/*
# only add user configurations if they exist
if [ -d users ]; then
user_configs=`ls users/*/config.xml`
#!/bin/bash
# source: https://medium.com/@_oleksii_/how-to-backup-and-restore-jenkins-complete-guide-62fc2f99b457
# Jenkins Configuraitons Directory
cd $JENKINS_HOME
git fetch
git merge --commit
# Add general configurations, job configurations, and user content