Posts by Tag

Scripts

Switching audio bluetooth profiles with a script

less than 1 minute read

I wanted to be able to switch between “listening to music” and “using the headphone’s microphone” easily. i3blocks allows me to write scripts emit a status l...

Populating a NetworkX graph with a scanner

less than 1 minute read

I had a graph living outside Pythonland (a commit tree with dependencies) and wanted to do graphy things to it. To do that, I first had to put the data into ...

DNS Override for a Single Process

1 minute read

The Problem I needed to run a mobile emulator on my laptop, in order to test some DNS server changes before releasing them. However, since the emulator had n...

Keeping Windows Awake (with PowerShell)

3 minute read

The story I got a new game on Steam and got set to downloading it. For some reason, Steam and Windows have decided that it’s better to save some electricity ...

Chef “Share This” script

less than 1 minute read

I wrote this little script to upload the current cookbook to the Chef Supermarket. It should be run from within the cookbook’s directory.

Dry Run for Python Pip

3 minute read

As I wrote some time ago, I started my own python cookbook for Chef because I didn’t like the direction the “default” one was going. I recently added a new f...

Filtering in Shell

1 minute read

Today I told someone that a feature I’m missing in Bash is filtering. Then I thought about how much I miss it, so I went ahead and “implemented” it.

Cookbook Versioning Script

5 minute read

The Problem I’ve always disliked releasing cookbook versions manually. The process requires a lot of bureaucratic steps which are easy to forget and require ...

Migrating Grafana’s Dashboards

less than 1 minute read

Similar to my Graphite dashboard migration script, I made a Grafana one. I’m targeting Grafana v2+. Note it’s using http for its HTTP calls. ```ruby old_serv...

Parsing AWS billing

3 minute read

The Story I never understood the AWS billing very well and happily left it to my CTO. A couple of days ago, however, my CTO secretly told me he’s mainly inte...

Open-Gridview - the FOSS Out-Gridview

3 minute read

The Story I’ve been a Microsoft SysAdmin for a long time before switching for Linux. During which, I scripted a lot in PowerShell. PowerShell has several “ou...

Using a global lock in Chef

4 minute read

The Story Our dev team is currently using a Snowflake-like ID generation scheme that looks like this: (Diagram by Elad Rosenhim, architect and companion at ...

Enhancing Packer Templates with eRuby

3 minute read

The Problem Packer is a great tool for creating machine images, and I’m using it to create EC2 AMIs. My issue with it is that Packer is using JSON for input,...

Running Inline DSL in ChefSpec

3 minute read

The Problem I have a pet Chef cookbook in charge of managing SELinux policies in Linux machines (Take a look). Until today I got along fine without testing, ...

Merging known_hosts files

2 minute read

The Story Some time ago, some colleague rebuilt several servers and reused their names (think sql1,sql2 etc). Obviously the new servers had different SSH ser...

Generating known_hosts file using Chef

2 minute read

The Story This post relates to my previous post. I was trying to create a script to amend my known_hosts file (where SSH keeps fingerprints of all of the ser...

Migrating Graphite’s Dashboards

less than 1 minute read

I just made a small script to migrate dashboards between two graphite servers. Couldn’t find a similar one anywhere, so I thought I’d upload it. Note it’s us...

Sending mail on coredumps

4 minute read

The Story I recently found out that some of our backend code suffers from memory-related ceashes, namely SIGSEGV (a program tries to access memory it doesn’t...

Using RPMBuild - My Shortlist

3 minute read

The Story I was trying to tinker with Abrt, a daemon in charge of collecting and diagnosing various crashes in RHEL (more on that in a different post). Becau...

Managing EC2 reservations with Scripts

2 minute read

The Story Since we tend to hold our AWS EC2 VMs for a long time, we usually reserve them. Reservations are like pre-buying instances - you pay AWS ahead of t...

Scripting YUM provides search using Python

1 minute read

Update 24-06-15 Thanks to this page, I fixed my script. It no longer requires root privillages. I also muted informational messages because they were not ver...

Resizing AWS root EBS in CentOS HVM

3 minute read

Update 04.07.15 This method doesn’t work anymore because of some weird AWS restriction, which says you can’t connect the root device of a marketplace AMI (li...

AWS’s Block Device Mapping in CentOS

2 minute read

The Story I’m using Amazon’s EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, epheme...

Adding Repositories for Inspection

less than 1 minute read

Sometime I want to inspect software repositories. However, I don’t want my machine to actually install anything from it. To do so, I made a small bash functi...

Timing Execution By Output Lines

1 minute read

The Story Today I got annoyed that some puppet agent runs took me over 90 seconds to complete, even though they actually did nothing (no change was needed). ...

Mass-Checking SSH Connections using Parallel

1 minute read

Today I wanted to make sure I have SSH access to about 100 servers. Obviously, I wasn’t going to verify the list by hand, so I put all of the servers’ names ...

Finding Accounts Trusted for Delegation

2 minute read

As part of a security audit, I was asked to help in finding all accounts marked with “Trusted for Delegation” What is “Trust for Delegation” You can try rea...

setspn Duplicates and Case Sensitivity

less than 1 minute read

Today I found out that the command I use to find duplicate SPNs, setspn -x is case sensitive, meaning that the following SPNs don’t count as duplicates: HOS...

Filtering Windows Event Log using XPath

4 minute read

When I want to search for events in Windows Event Log, I can usually make do with searching / filtering through the Event Viewer. For instance, to see all 46...

Removing all Metro Apps from Windows 8

less than 1 minute read

I wanted to open some photos today (to add to my blog) on my Windows 8 workstation, and it kept opening the full-screen metro app instead of the normal pictu...

Wget in PowerShell v3

less than 1 minute read

I’ve been envying my *nix brethren for having Wget for a long time. To get the contents of a web page or download a file using http I had to use workarounds ...

Testing actual SMB version

1 minute read

Ever since I got employed in my present company, I’ve been told that our NetApp Filer supports SMB2 when used as NAS. I was always skeptic of that (due to h...

Mass Setting Permissions on Remote Shares

2 minute read

I was recently asked by one of my teammates to add several NTFS permissions to the root folders of a bunch of shares. Seems easy, but I had two problems:

Finding WSUS Clients by SusClientId

less than 1 minute read

Today someone showed me a strange problem - he had servers that recently installed new updates from his WSUS server, but he couldn’t find them in the WSUS co...

Brute Force Guessing for User Passwords

1 minute read

Our security team complained to me that they found a lot of users with trivial passwords simply by trying to log in as them. They asked me to write them a sc...

Automaticlly Extracting Downloaded Torrents

1 minute read

As every average geek, I too download torrents (containing only legal, copyright-free material, of course), and most of the time the torrents contain multi-f...

Determining Size of all Tables in a Database

less than 1 minute read

Just a quick SQL script to get the rowcount and size data of every table in the current database: CREATE TABLE #sizeof ( name varchar (70), [rows] int, re...

Creating proxied http requests with PowerShell

less than 1 minute read

I’m working on some sort of HTTP proxy (maybe more details about it later), and to test it I’ve created a short PowerShell script. Note it also performs basi...

Lowercasing PTR records in DNS

1 minute read

Recently, one of the IT crowd informed me that he can’t delete some of his PTR records through the DNS management console (dnsmgmt.msc). The record would app...

Enabling Remote Desktop Remotely

less than 1 minute read

According to this Technet article, to enable remote desktop remotely by using the registry you need to set the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe...

Checking for conflicting oIDs

1 minute read

I got word that this script was useful for some other IT team, so it’s definitely blog-worthy! The Story I’ve inherited some AD forests with their schema ext...

Stsadm / new SPSite is slow

3 minute read

Update: Get the script here The Story A couple of days ago, developer extraordinaire Itay Shakury was doing performance tuning on one of our SharePoint appli...

A few seconds about psbase

less than 1 minute read

I really like Powershell’s dynamic type system, which allows you to, among other things, view XML nodes really easily. For example, to view the connectionStr...

Get-BigDirectories

1 minute read

Note: This script is better than just ls -rec | measure, because measure measures only one field, and when iterating over many files and directories, every i...

Auto-Sorting Computers in WSUS

less than 1 minute read

When I installed my first WSUS server, I liked the idea of auto-assigning computers into different WSUS groups according to domains using the group policy’s ...

Querying SQL Servers

1 minute read

Before I had a chance to study Microsoft’s SQL Server Management Studio (SSMS)’s Powershell SnapIn, I needed to grab some data from an SQL DB. I ended up cre...

Back to Top ↑

PowerShell

Keeping Windows Awake (with PowerShell)

3 minute read

The story I got a new game on Steam and got set to downloading it. For some reason, Steam and Windows have decided that it’s better to save some electricity ...

Open-Gridview - the FOSS Out-Gridview

3 minute read

The Story I’ve been a Microsoft SysAdmin for a long time before switching for Linux. During which, I scripted a lot in PowerShell. PowerShell has several “ou...

Finding Accounts Trusted for Delegation

2 minute read

As part of a security audit, I was asked to help in finding all accounts marked with “Trusted for Delegation” What is “Trust for Delegation” You can try rea...

Filtering Windows Event Log using XPath

4 minute read

When I want to search for events in Windows Event Log, I can usually make do with searching / filtering through the Event Viewer. For instance, to see all 46...

Removing all Metro Apps from Windows 8

less than 1 minute read

I wanted to open some photos today (to add to my blog) on my Windows 8 workstation, and it kept opening the full-screen metro app instead of the normal pictu...

Wget in PowerShell v3

less than 1 minute read

I’ve been envying my *nix brethren for having Wget for a long time. To get the contents of a web page or download a file using http I had to use workarounds ...

Testing actual SMB version

1 minute read

Ever since I got employed in my present company, I’ve been told that our NetApp Filer supports SMB2 when used as NAS. I was always skeptic of that (due to h...

Mass Setting Permissions on Remote Shares

2 minute read

I was recently asked by one of my teammates to add several NTFS permissions to the root folders of a bunch of shares. Seems easy, but I had two problems:

Finding WSUS Clients by SusClientId

less than 1 minute read

Today someone showed me a strange problem - he had servers that recently installed new updates from his WSUS server, but he couldn’t find them in the WSUS co...

Brute Force Guessing for User Passwords

1 minute read

Our security team complained to me that they found a lot of users with trivial passwords simply by trying to log in as them. They asked me to write them a sc...

Automaticlly Extracting Downloaded Torrents

1 minute read

As every average geek, I too download torrents (containing only legal, copyright-free material, of course), and most of the time the torrents contain multi-f...

Creating proxied http requests with PowerShell

less than 1 minute read

I’m working on some sort of HTTP proxy (maybe more details about it later), and to test it I’ve created a short PowerShell script. Note it also performs basi...

Lowercasing PTR records in DNS

1 minute read

Recently, one of the IT crowd informed me that he can’t delete some of his PTR records through the DNS management console (dnsmgmt.msc). The record would app...

Enabling Remote Desktop Remotely

less than 1 minute read

According to this Technet article, to enable remote desktop remotely by using the registry you need to set the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe...

Checking for conflicting oIDs

1 minute read

I got word that this script was useful for some other IT team, so it’s definitely blog-worthy! The Story I’ve inherited some AD forests with their schema ext...

Stsadm / new SPSite is slow

3 minute read

Update: Get the script here The Story A couple of days ago, developer extraordinaire Itay Shakury was doing performance tuning on one of our SharePoint appli...

A few seconds about psbase

less than 1 minute read

I really like Powershell’s dynamic type system, which allows you to, among other things, view XML nodes really easily. For example, to view the connectionStr...

Get-BigDirectories

1 minute read

Note: This script is better than just ls -rec | measure, because measure measures only one field, and when iterating over many files and directories, every i...

Auto-Sorting Computers in WSUS

less than 1 minute read

When I installed my first WSUS server, I liked the idea of auto-assigning computers into different WSUS groups according to domains using the group policy’s ...

Querying SQL Servers

1 minute read

Before I had a chance to study Microsoft’s SQL Server Management Studio (SSMS)’s Powershell SnapIn, I needed to grab some data from an SQL DB. I ended up cre...

Testing stranded group policies

1 minute read

Ever had GPO Version differences between the AD and the Sysvol? Sure, you might have a healthy FRS/DFSR architecture, but the replication takes time. It’s an...

Back to Top ↑

Linux

WSL for non-programming security analysts

3 minute read

I have a friend who isn’t a developer and believes that coding is beyond their grasp. They work as a security analyst and prefer using Windows as their opera...

Bash “Keep or Delete” script for PDFs

1 minute read

I recently discovered that I had over 100 PDFs in my “Downloads” directory and needed to determine which ones I wanted to keep. Instead of spending 10 minute...

Get Android App Sizes with ADB

1 minute read

Upon receiving a notification from my NVidia Shield indicating that it was running low on storage space, I attempted to use the device’s interface to trouble...

Sapling Commands

less than 1 minute read

Sapling (the Facebook-released SCM) is great, but the docs are not-great. I thought I’d list some commands it took me a while to undertand, for me and for ot...

Quick Docker Compose commands for ECS

less than 1 minute read

I’m pretty new to Dockering in the wild, and I’m trying to use the new ECS integration to push all of my tiny app to the cloud.

Switching audio bluetooth profiles with a script

less than 1 minute read

I wanted to be able to switch between “listening to music” and “using the headphone’s microphone” easily. i3blocks allows me to write scripts emit a status l...

Sortiq - sort, uniq, sort

less than 1 minute read

This is a small snippet I find extremely useful. You should have it in your ~/.bashrc: sortiq() { sort | uniq -c | sort -rn ; } It will count the instances ...

DNS Override for a Single Process

1 minute read

The Problem I needed to run a mobile emulator on my laptop, in order to test some DNS server changes before releasing them. However, since the emulator had n...

Running external Ruby code from Vagrant

6 minute read

The Story Like a lot of Chef users, I’m using Vagrant for testing my cookbooks. I’m also using Berkshelf for providing the Vagrant box with the cookbooks it ...

How Chef’s use_inline_resources works

2 minute read

I recently had an issue with use_inline_resources. This feature’s documentation is lackluster, and I learnt about its magic thanks to some scraps of informat...

Sending mail on coredumps

4 minute read

The Story I recently found out that some of our backend code suffers from memory-related ceashes, namely SIGSEGV (a program tries to access memory it doesn’t...

Using RPMBuild - My Shortlist

3 minute read

The Story I was trying to tinker with Abrt, a daemon in charge of collecting and diagnosing various crashes in RHEL (more on that in a different post). Becau...

Installing Growroot on CentOS

4 minute read

The story I currently work with CentOS on Amazon EC2. As I previously written, The HVM version of the AMI is created with a partitioned disk, instead of havi...

Chroot Snippet

less than 1 minute read

The Story Some time ago, my PC wouldn’t boot. This was my fault, as I needed to resize some partition, and resizing in Linux really means deleting the partit...

Appending Newline to File Ends with Ruby

less than 1 minute read

I recently took over managing some config files from my dev colleagues. I was extremely annoyed to be reminded that Notepad (Windows’ text editor) does 2 maj...

Init file for HBase Thrift Server

2 minute read

As part of our HBase setup, we run Thrift servers. This is pretty simple, except for the init files. Since we’re running Thrift standalone (and not as part o...

Scripting YUM provides search using Python

1 minute read

Update 24-06-15 Thanks to this page, I fixed my script. It no longer requires root privillages. I also muted informational messages because they were not ver...

Managing chef users with Chef

2 minute read

I needed to create seperate Chef accounts for some utility program running in my Chef server. I was finally able to deprecate it today, but I saved those sni...

Locking Down Jenkins’ Authentication

4 minute read

Update 19.02.15 After posting my script in the Jenkins mailing list, I was told about a simpler way for implmenting my authorization strategy. I’m leaving th...

Resizing AWS root EBS in CentOS HVM

3 minute read

Update 04.07.15 This method doesn’t work anymore because of some weird AWS restriction, which says you can’t connect the root device of a marketplace AMI (li...

Booting with UUID without initramfs

2 minute read

The Story I recently wiped my CubieTruck (a single board computer, like RaspberryPi), and tried installing the root filesystem on a hard drive instead of the...

Getting Git Submodule Detailed Status

1 minute read

The Story I manage every one of my Chef cookbooks as a single git repository, complying with the BerkShelf paradigm. I keep them all as submodules in a “supe...

CSV Tricks

1 minute read

The Story I’ve been requested to recreate some spreadsheet for our execs. Being annoying as usual, I made it a point to only use scripting to build the table...

Troubleshooting StatsD

1 minute read

About StatsD StatsD is a tool developed by Etsy and Flickr (complicated story). Its main use is providing a middleman for Graphite, which is a real-time grap...

SSH vs OpenVPN for Tunneling

5 minute read

Update 28.01.16 I found some sites referring to this post. Below are the common complaints I saw, and my replies:

AWS’s Block Device Mapping in CentOS

2 minute read

The Story I’m using Amazon’s EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, epheme...

Linux and SSDs - Should You TRIM?

3 minute read

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution. What is TRIM? As a Windows sysadmin, I didn...

Why Pinning

2 minute read

There are plenty of guides about apt pinning, but no one really explains the motivation to do so. It took me some time to understand that, so I thought I’d w...

My Pinning Guidelines

4 minute read

In my previous post about pinning I talked about the reasons to configure apt pinning. This post details my logic about what and how to pin.

Adding Repositories for Inspection

less than 1 minute read

Sometime I want to inspect software repositories. However, I don’t want my machine to actually install anything from it. To do so, I made a small bash functi...

Setting up Gargoyle as a Time Server

1 minute read

The Story For reasons unknown to me, Debian’s NTP daemon only works on udp port 123, even when operating as a client. This is a problem because my network c...

Timing Execution By Output Lines

1 minute read

The Story Today I got annoyed that some puppet agent runs took me over 90 seconds to complete, even though they actually did nothing (no change was needed). ...

Fixing Ugly Hebrew on Ubuntu + Firefox

less than 1 minute read

The default viewing experience, when visiting some Hebrew sites when using Firefox on Ubuntu, is quite unsightly. If we check Ynet.co.il, a news site, we’ll ...

Setting Up Samba on Raspberry Pi

2 minute read

After setting up my rPi TorrentBox, I wanted to let my family access the downloaded files. Since they use Windows (and I don’t want to bother their systems w...

Back to Top ↑

Security

Managing chef users with Chef

2 minute read

I needed to create seperate Chef accounts for some utility program running in my Chef server. I was finally able to deprecate it today, but I saved those sni...

Locking Down Jenkins’ Authentication

4 minute read

Update 19.02.15 After posting my script in the Jenkins mailing list, I was told about a simpler way for implmenting my authorization strategy. I’m leaving th...

SSH vs OpenVPN for Tunneling

5 minute read

Update 28.01.16 I found some sites referring to this post. Below are the common complaints I saw, and my replies:

Why Pinning

2 minute read

There are plenty of guides about apt pinning, but no one really explains the motivation to do so. It took me some time to understand that, so I thought I’d w...

My Pinning Guidelines

4 minute read

In my previous post about pinning I talked about the reasons to configure apt pinning. This post details my logic about what and how to pin.

Finding Accounts Trusted for Delegation

2 minute read

As part of a security audit, I was asked to help in finding all accounts marked with “Trusted for Delegation” What is “Trust for Delegation” You can try rea...

Setting Up Samba on Raspberry Pi

2 minute read

After setting up my rPi TorrentBox, I wanted to let my family access the downloaded files. Since they use Windows (and I don’t want to bother their systems w...

setspn Duplicates and Case Sensitivity

less than 1 minute read

Today I found out that the command I use to find duplicate SPNs, setspn -x is case sensitive, meaning that the following SPNs don’t count as duplicates: HOS...

Filtering Windows Event Log using XPath

4 minute read

When I want to search for events in Windows Event Log, I can usually make do with searching / filtering through the Event Viewer. For instance, to see all 46...

Group Policy Security Filtering and Loopback

less than 1 minute read

I recently discovered that when applying a GP object using loopback and user security filtering (allowing only specific users to apply the GP), the computer ...

Mass Setting Permissions on Remote Shares

2 minute read

I was recently asked by one of my teammates to add several NTFS permissions to the root folders of a bunch of shares. Seems easy, but I had two problems:

Brute Force Guessing for User Passwords

1 minute read

Our security team complained to me that they found a lot of users with trivial passwords simply by trying to log in as them. They asked me to write them a sc...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Enabling Remote Desktop Remotely

less than 1 minute read

According to this Technet article, to enable remote desktop remotely by using the registry you need to set the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe...

Vanishing permissions on AD objects

1 minute read

I recently managed to solve a problem that bugged me for a ~ year - permissions on a specific group on AD would vanish, and the change won’t show up on the s...

SPNs - Who? Why? Where?

4 minute read

I was making an introduction to a new teammate about SharePoint infrastructure, and one of the things I had to teach her about was SPNs. I was surprised to k...

2008 Clusters can’t change password

1 minute read

Last week MS’s PFE Moti Bani and me solved a problem that bugged me for ~ a year - since the day we’ve started deploying 2008 clusters in our production envi...

Back to Top ↑

Active Directory

Finding Accounts Trusted for Delegation

2 minute read

As part of a security audit, I was asked to help in finding all accounts marked with “Trusted for Delegation” What is “Trust for Delegation” You can try rea...

setspn Duplicates and Case Sensitivity

less than 1 minute read

Today I found out that the command I use to find duplicate SPNs, setspn -x is case sensitive, meaning that the following SPNs don’t count as duplicates: HOS...

Group Policy Security Filtering and Loopback

less than 1 minute read

I recently discovered that when applying a GP object using loopback and user security filtering (allowing only specific users to apply the GP), the computer ...

Brute Force Guessing for User Passwords

1 minute read

Our security team complained to me that they found a lot of users with trivial passwords simply by trying to log in as them. They asked me to write them a sc...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Checking for conflicting oIDs

1 minute read

I got word that this script was useful for some other IT team, so it’s definitely blog-worthy! The Story I’ve inherited some AD forests with their schema ext...

Vanishing permissions on AD objects

1 minute read

I recently managed to solve a problem that bugged me for a ~ year - permissions on a specific group on AD would vanish, and the change won’t show up on the s...

SPNs - Who? Why? Where?

4 minute read

I was making an introduction to a new teammate about SharePoint infrastructure, and one of the things I had to teach her about was SPNs. I was surprised to k...

2008 Clusters can’t change password

1 minute read

Last week MS’s PFE Moti Bani and me solved a problem that bugged me for ~ a year - since the day we’ve started deploying 2008 clusters in our production envi...

Testing stranded group policies

1 minute read

Ever had GPO Version differences between the AD and the Sysvol? Sure, you might have a healthy FRS/DFSR architecture, but the replication takes time. It’s an...

Back to Top ↑

Mysteries Solved

Running external Ruby code from Vagrant

6 minute read

The Story Like a lot of Chef users, I’m using Vagrant for testing my cookbooks. I’m also using Berkshelf for providing the Vagrant box with the cookbooks it ...

Resizing AWS root EBS in CentOS HVM

3 minute read

Update 04.07.15 This method doesn’t work anymore because of some weird AWS restriction, which says you can’t connect the root device of a marketplace AMI (li...

Booting with UUID without initramfs

2 minute read

The Story I recently wiped my CubieTruck (a single board computer, like RaspberryPi), and tried installing the root filesystem on a hard drive instead of the...

SSH vs OpenVPN for Tunneling

5 minute read

Update 28.01.16 I found some sites referring to this post. Below are the common complaints I saw, and my replies:

AWS’s Block Device Mapping in CentOS

2 minute read

The Story I’m using Amazon’s EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, epheme...

Linux and SSDs - Should You TRIM?

3 minute read

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution. What is TRIM? As a Windows sysadmin, I didn...

Setting up Gargoyle as a Time Server

1 minute read

The Story For reasons unknown to me, Debian’s NTP daemon only works on udp port 123, even when operating as a client. This is a problem because my network c...

Network Monitor capture filter limitations

1 minute read

I recently had to deal with some network traffic issues, so naturally I turned to NetMon. My problem was with some TCP packets not reaching their destination...

Group Policy Security Filtering and Loopback

less than 1 minute read

I recently discovered that when applying a GP object using loopback and user security filtering (allowing only specific users to apply the GP), the computer ...

Testing actual SMB version

1 minute read

Ever since I got employed in my present company, I’ve been told that our NetApp Filer supports SMB2 when used as NAS. I was always skeptic of that (due to h...

Finding WSUS Clients by SusClientId

less than 1 minute read

Today someone showed me a strange problem - he had servers that recently installed new updates from his WSUS server, but he couldn’t find them in the WSUS co...

Reverse Lookup in SharePoint 2010

1 minute read

Every SharePoint noob knows that one can create list lookup relationships, like specifying that a book belongs in a specific bookshelf. What I didn’t know un...

Internet Explorer and SPNs

less than 1 minute read

After learning how SPNs work (read my “Who? Why? Where” to learn what’s an SPN), I was frustrated to find out that I can’t implement my experience in the rea...

Vanishing permissions on AD objects

1 minute read

I recently managed to solve a problem that bugged me for a ~ year - permissions on a specific group on AD would vanish, and the change won’t show up on the s...

Stsadm / new SPSite is slow

3 minute read

Update: Get the script here The Story A couple of days ago, developer extraordinaire Itay Shakury was doing performance tuning on one of our SharePoint appli...

2008 Clusters can’t change password

1 minute read

Last week MS’s PFE Moti Bani and me solved a problem that bugged me for ~ a year - since the day we’ve started deploying 2008 clusters in our production envi...

Back to Top ↑

Ruby

Chef “Share This” script

less than 1 minute read

I wrote this little script to upload the current cookbook to the Chef Supermarket. It should be run from within the cookbook’s directory.

Cookbook Versioning Script

5 minute read

The Problem I’ve always disliked releasing cookbook versions manually. The process requires a lot of bureaucratic steps which are easy to forget and require ...

Migrating Grafana’s Dashboards

less than 1 minute read

Similar to my Graphite dashboard migration script, I made a Grafana one. I’m targeting Grafana v2+. Note it’s using http for its HTTP calls. ```ruby old_serv...

Running external Ruby code from Vagrant

6 minute read

The Story Like a lot of Chef users, I’m using Vagrant for testing my cookbooks. I’m also using Berkshelf for providing the Vagrant box with the cookbooks it ...

Using a global lock in Chef

4 minute read

The Story Our dev team is currently using a Snowflake-like ID generation scheme that looks like this: (Diagram by Elad Rosenhim, architect and companion at ...

Enhancing Packer Templates with eRuby

3 minute read

The Problem Packer is a great tool for creating machine images, and I’m using it to create EC2 AMIs. My issue with it is that Packer is using JSON for input,...

Listing Chef Cookbook Licenses

less than 1 minute read

As part of a compliance check for our company, I was required to print the name/version of all FOSS proejcts I’m using. Most of it was digging around Gemfile...

Writing Complex Scripts in HBase Shell

1 minute read

The Story HBase installations include a shell for running arbitrary commands. For instance, if you want to view all of your snapshots, you can do something l...

Running Inline DSL in ChefSpec

3 minute read

The Problem I have a pet Chef cookbook in charge of managing SELinux policies in Linux machines (Take a look). Until today I got along fine without testing, ...

Generating known_hosts file using Chef

2 minute read

The Story This post relates to my previous post. I was trying to create a script to amend my known_hosts file (where SSH keeps fingerprints of all of the ser...

Chef Snippets

1 minute read

I thought I’d upload some interesting Chef-related snippets I accumulated.

How Chef’s use_inline_resources works

2 minute read

I recently had an issue with use_inline_resources. This feature’s documentation is lackluster, and I learnt about its magic thanks to some scraps of informat...

Migrating Graphite’s Dashboards

less than 1 minute read

I just made a small script to migrate dashboards between two graphite servers. Couldn’t find a similar one anywhere, so I thought I’d upload it. Note it’s us...

Managing EC2 reservations with Scripts

2 minute read

The Story Since we tend to hold our AWS EC2 VMs for a long time, we usually reserve them. Reservations are like pre-buying instances - you pay AWS ahead of t...

Appending Newline to File Ends with Ruby

less than 1 minute read

I recently took over managing some config files from my dev colleagues. I was extremely annoyed to be reminded that Notepad (Windows’ text editor) does 2 maj...

Managing chef users with Chef

2 minute read

I needed to create seperate Chef accounts for some utility program running in my Chef server. I was finally able to deprecate it today, but I saved those sni...

Resizing AWS root EBS in CentOS HVM

3 minute read

Update 04.07.15 This method doesn’t work anymore because of some weird AWS restriction, which says you can’t connect the root device of a marketplace AMI (li...

CSV Tricks

1 minute read

The Story I’ve been requested to recreate some spreadsheet for our execs. Being annoying as usual, I made it a point to only use scripting to build the table...

AWS’s Block Device Mapping in CentOS

2 minute read

The Story I’m using Amazon’s EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, epheme...

Back to Top ↑

Windows

WSL for non-programming security analysts

3 minute read

I have a friend who isn’t a developer and believes that coding is beyond their grasp. They work as a security analyst and prefer using Windows as their opera...

Keeping Windows Awake (with PowerShell)

3 minute read

The story I got a new game on Steam and got set to downloading it. For some reason, Steam and Windows have decided that it’s better to save some electricity ...

Appending Newline to File Ends with Ruby

less than 1 minute read

I recently took over managing some config files from my dev colleagues. I was extremely annoyed to be reminded that Notepad (Windows’ text editor) does 2 maj...

Finding Accounts Trusted for Delegation

2 minute read

As part of a security audit, I was asked to help in finding all accounts marked with “Trusted for Delegation” What is “Trust for Delegation” You can try rea...

setspn Duplicates and Case Sensitivity

less than 1 minute read

Today I found out that the command I use to find duplicate SPNs, setspn -x is case sensitive, meaning that the following SPNs don’t count as duplicates: HOS...

Filtering Windows Event Log using XPath

4 minute read

When I want to search for events in Windows Event Log, I can usually make do with searching / filtering through the Event Viewer. For instance, to see all 46...

Enabling Remote Desktop Remotely

less than 1 minute read

According to this Technet article, to enable remote desktop remotely by using the registry you need to set the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe...

2008 Clusters can’t change password

1 minute read

Last week MS’s PFE Moti Bani and me solved a problem that bugged me for ~ a year - since the day we’ve started deploying 2008 clusters in our production envi...

Back to Top ↑

Ramblings

Is this really an emergency?

6 minute read

One of the teams I worked with would do an “engineering pain-point” survey twice a year. During one of those surveys, the main complaint was that on-calls ha...

a 1.5GB string

4 minute read

In my previous role, I supported a Java service that operated similarly to RDP or Citrix by enabling remote UI functionality. This service relied on sessions...

Productivity tips for a FAANG engineer

1 minute read

Here are some things I learnt during my career in Facebook, and think could benefit someone new to the field. As an engineer in Facebook, you have a great de...

My tips on Getting a Job

7 minute read

A lot of people (>3) asked me in the last month or so about how to land a first job after leaving the army / graduating from university, so I thought I’d ...

Linux and SSDs - Should You TRIM?

3 minute read

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution. What is TRIM? As a Windows sysadmin, I didn...

Filtering Windows Event Log using XPath

4 minute read

When I want to search for events in Windows Event Log, I can usually make do with searching / filtering through the Event Viewer. For instance, to see all 46...

Speed boosting disconnected environments

less than 1 minute read

Hi there. Not a while ago, I’ve created a post about stsadm.exe / new SPSite() being slow in disconnected environments. Just wanted to point out that I’ve tr...

New blog… yay

less than 1 minute read

Hi. My name is Nitzan, and I’m a MS-IT guy. Whenever I run into a problem I can’t solve during my work, I almost always end up finding the answer in some blo...

Back to Top ↑

Python

CSV to JSON stream converter in Python

less than 1 minute read

I’ve been working with some govermental data that is available as huge (>50G) CSV files. While there are workarounds to working with large files, I wanted...

Populating a NetworkX graph with a scanner

less than 1 minute read

I had a graph living outside Pythonland (a commit tree with dependencies) and wanted to do graphy things to it. To do that, I first had to put the data into ...

DNS Namesake - the DNS MitM

2 minute read

The Story Imagine this situtation: ```text THE WORLD / company.com | A s1.red.company.com A s2.red.company.com … A sN...

Dry Run for Python Pip

3 minute read

As I wrote some time ago, I started my own python cookbook for Chef because I didn’t like the direction the “default” one was going. I recently added a new f...

Parsing AWS billing

3 minute read

The Story I never understood the AWS billing very well and happily left it to my CTO. A couple of days ago, however, my CTO secretly told me he’s mainly inte...

Open-Gridview - the FOSS Out-Gridview

3 minute read

The Story I’ve been a Microsoft SysAdmin for a long time before switching for Linux. During which, I scripted a lot in PowerShell. PowerShell has several “ou...

Merging known_hosts files

2 minute read

The Story Some time ago, some colleague rebuilt several servers and reused their names (think sql1,sql2 etc). Obviously the new servers had different SSH ser...

Sending mail on coredumps

4 minute read

The Story I recently found out that some of our backend code suffers from memory-related ceashes, namely SIGSEGV (a program tries to access memory it doesn’t...

Scripting YUM provides search using Python

1 minute read

Update 24-06-15 Thanks to this page, I fixed my script. It no longer requires root privillages. I also muted informational messages because they were not ver...

Back to Top ↑

Chef

Chef “Share This” script

less than 1 minute read

I wrote this little script to upload the current cookbook to the Chef Supermarket. It should be run from within the cookbook’s directory.

Cookbook Versioning Script

5 minute read

The Problem I’ve always disliked releasing cookbook versions manually. The process requires a lot of bureaucratic steps which are easy to forget and require ...

Running external Ruby code from Vagrant

6 minute read

The Story Like a lot of Chef users, I’m using Vagrant for testing my cookbooks. I’m also using Berkshelf for providing the Vagrant box with the cookbooks it ...

Using a global lock in Chef

4 minute read

The Story Our dev team is currently using a Snowflake-like ID generation scheme that looks like this: (Diagram by Elad Rosenhim, architect and companion at ...

Listing Chef Cookbook Licenses

less than 1 minute read

As part of a compliance check for our company, I was required to print the name/version of all FOSS proejcts I’m using. Most of it was digging around Gemfile...

Running Inline DSL in ChefSpec

3 minute read

The Problem I have a pet Chef cookbook in charge of managing SELinux policies in Linux machines (Take a look). Until today I got along fine without testing, ...

Generating known_hosts file using Chef

2 minute read

The Story This post relates to my previous post. I was trying to create a script to amend my known_hosts file (where SSH keeps fingerprints of all of the ser...

Chef Snippets

1 minute read

I thought I’d upload some interesting Chef-related snippets I accumulated.

How Chef’s use_inline_resources works

2 minute read

I recently had an issue with use_inline_resources. This feature’s documentation is lackluster, and I learnt about its magic thanks to some scraps of informat...

Managing chef users with Chef

2 minute read

I needed to create seperate Chef accounts for some utility program running in my Chef server. I was finally able to deprecate it today, but I saved those sni...

AWS’s Block Device Mapping in CentOS

2 minute read

The Story I’m using Amazon’s EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, epheme...

Back to Top ↑

Bash

WSL for non-programming security analysts

3 minute read

I have a friend who isn’t a developer and believes that coding is beyond their grasp. They work as a security analyst and prefer using Windows as their opera...

Bash “Keep or Delete” script for PDFs

1 minute read

I recently discovered that I had over 100 PDFs in my “Downloads” directory and needed to determine which ones I wanted to keep. Instead of spending 10 minute...

Get Android App Sizes with ADB

1 minute read

Upon receiving a notification from my NVidia Shield indicating that it was running low on storage space, I attempted to use the device’s interface to trouble...

Sortiq - sort, uniq, sort

less than 1 minute read

This is a small snippet I find extremely useful. You should have it in your ~/.bashrc: sortiq() { sort | uniq -c | sort -rn ; } It will count the instances ...

Filtering in Shell

1 minute read

Today I told someone that a feature I’m missing in Bash is filtering. Then I thought about how much I miss it, so I went ahead and “implemented” it.

Cookbook Versioning Script

5 minute read

The Problem I’ve always disliked releasing cookbook versions manually. The process requires a lot of bureaucratic steps which are easy to forget and require ...

Init file for HBase Thrift Server

2 minute read

As part of our HBase setup, we run Thrift servers. This is pretty simple, except for the init files. Since we’re running Thrift standalone (and not as part o...

Getting Git Submodule Detailed Status

1 minute read

The Story I manage every one of my Chef cookbooks as a single git repository, complying with the BerkShelf paradigm. I keep them all as submodules in a “supe...

Timing Execution By Output Lines

1 minute read

The Story Today I got annoyed that some puppet agent runs took me over 90 seconds to complete, even though they actually did nothing (no change was needed). ...

Mass-Checking SSH Connections using Parallel

1 minute read

Today I wanted to make sure I have SSH access to about 100 servers. Obviously, I wasn’t going to verify the list by hand, so I put all of the servers’ names ...

Back to Top ↑

Group Policy

Group Policy Security Filtering and Loopback

less than 1 minute read

I recently discovered that when applying a GP object using loopback and user security filtering (allowing only specific users to apply the GP), the computer ...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Setting Dynamic RPC Port Ranges

3 minute read

We recently had to manually set the dynamic RPC port range in our servers, mainly because Exchange 2010 sets the port range so wide that the firewall guys (r...

Testing stranded group policies

1 minute read

Ever had GPO Version differences between the AD and the Sysvol? Sure, you might have a healthy FRS/DFSR architecture, but the replication takes time. It’s an...

Back to Top ↑

One-Liner

Adding Repositories for Inspection

less than 1 minute read

Sometime I want to inspect software repositories. However, I don’t want my machine to actually install anything from it. To do so, I made a small bash functi...

Timing Execution By Output Lines

1 minute read

The Story Today I got annoyed that some puppet agent runs took me over 90 seconds to complete, even though they actually did nothing (no change was needed). ...

Mass-Checking SSH Connections using Parallel

1 minute read

Today I wanted to make sure I have SSH access to about 100 servers. Obviously, I wasn’t going to verify the list by hand, so I put all of the servers’ names ...

Finding Accounts Trusted for Delegation

2 minute read

As part of a security audit, I was asked to help in finding all accounts marked with “Trusted for Delegation” What is “Trust for Delegation” You can try rea...

setspn Duplicates and Case Sensitivity

less than 1 minute read

Today I found out that the command I use to find duplicate SPNs, setspn -x is case sensitive, meaning that the following SPNs don’t count as duplicates: HOS...

Removing all Metro Apps from Windows 8

less than 1 minute read

I wanted to open some photos today (to add to my blog) on my Windows 8 workstation, and it kept opening the full-screen metro app instead of the normal pictu...

Enabling Remote Desktop Remotely

less than 1 minute read

According to this Technet article, to enable remote desktop remotely by using the registry you need to set the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe...

Back to Top ↑

SharePoint

Wget in PowerShell v3

less than 1 minute read

I’ve been envying my *nix brethren for having Wget for a long time. To get the contents of a web page or download a file using http I had to use workarounds ...

Reverse Lookup in SharePoint 2010

1 minute read

Every SharePoint noob knows that one can create list lookup relationships, like specifying that a book belongs in a specific bookshelf. What I didn’t know un...

Internet Explorer and SPNs

less than 1 minute read

After learning how SPNs work (read my “Who? Why? Where” to learn what’s an SPN), I was frustrated to find out that I can’t implement my experience in the rea...

Stsadm / new SPSite is slow

3 minute read

Update: Get the script here The Story A couple of days ago, developer extraordinaire Itay Shakury was doing performance tuning on one of our SharePoint appli...

SPNs - Who? Why? Where?

4 minute read

I was making an introduction to a new teammate about SharePoint infrastructure, and one of the things I had to teach her about was SPNs. I was surprised to k...

Back to Top ↑

HTTP

Wget in PowerShell v3

less than 1 minute read

I’ve been envying my *nix brethren for having Wget for a long time. To get the contents of a web page or download a file using http I had to use workarounds ...

Creating proxied http requests with PowerShell

less than 1 minute read

I’m working on some sort of HTTP proxy (maybe more details about it later), and to test it I’ve created a short PowerShell script. Note it also performs basi...

Back to Top ↑

Kerberos

Finding Accounts Trusted for Delegation

2 minute read

As part of a security audit, I was asked to help in finding all accounts marked with “Trusted for Delegation” What is “Trust for Delegation” You can try rea...

setspn Duplicates and Case Sensitivity

less than 1 minute read

Today I found out that the command I use to find duplicate SPNs, setspn -x is case sensitive, meaning that the following SPNs don’t count as duplicates: HOS...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Internet Explorer and SPNs

less than 1 minute read

After learning how SPNs work (read my “Who? Why? Where” to learn what’s an SPN), I was frustrated to find out that I can’t implement my experience in the rea...

SPNs - Who? Why? Where?

4 minute read

I was making an introduction to a new teammate about SharePoint infrastructure, and one of the things I had to teach her about was SPNs. I was surprised to k...

Back to Top ↑

Registry

Finding WSUS Clients by SusClientId

less than 1 minute read

Today someone showed me a strange problem - he had servers that recently installed new updates from his WSUS server, but he couldn’t find them in the WSUS co...

Setting Dynamic RPC Port Ranges

3 minute read

We recently had to manually set the dynamic RPC port range in our servers, mainly because Exchange 2010 sets the port range so wide that the firewall guys (r...

Enabling Remote Desktop Remotely

less than 1 minute read

According to this Technet article, to enable remote desktop remotely by using the registry you need to set the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe...

Back to Top ↑

Event Log

setspn Duplicates and Case Sensitivity

less than 1 minute read

Today I found out that the command I use to find duplicate SPNs, setspn -x is case sensitive, meaning that the following SPNs don’t count as duplicates: HOS...

Filtering Windows Event Log using XPath

4 minute read

When I want to search for events in Windows Event Log, I can usually make do with searching / filtering through the Event Viewer. For instance, to see all 46...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Windows Event Collection

3 minute read

I’ve recently implemented an enterprise-wide solution of event collection in our organization, using Windows’ built-in mechanism called the Windows Event Col...

Back to Top ↑

AWS

Quick Docker Compose commands for ECS

less than 1 minute read

I’m pretty new to Dockering in the wild, and I’m trying to use the new ECS integration to push all of my tiny app to the cloud.

Parsing AWS billing

3 minute read

The Story I never understood the AWS billing very well and happily left it to my CTO. A couple of days ago, however, my CTO secretly told me he’s mainly inte...

Installing Growroot on CentOS

4 minute read

The story I currently work with CentOS on Amazon EC2. As I previously written, The HVM version of the AMI is created with a partitioned disk, instead of havi...

Managing EC2 reservations with Scripts

2 minute read

The Story Since we tend to hold our AWS EC2 VMs for a long time, we usually reserve them. Reservations are like pre-buying instances - you pay AWS ahead of t...

Resizing AWS root EBS in CentOS HVM

3 minute read

Update 04.07.15 This method doesn’t work anymore because of some weird AWS restriction, which says you can’t connect the root device of a marketplace AMI (li...

AWS’s Block Device Mapping in CentOS

2 minute read

The Story I’m using Amazon’s EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, epheme...

Back to Top ↑

FileSystem

Linux and SSDs - Should You TRIM?

3 minute read

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution. What is TRIM? As a Windows sysadmin, I didn...

Testing actual SMB version

1 minute read

Ever since I got employed in my present company, I’ve been told that our NetApp Filer supports SMB2 when used as NAS. I was always skeptic of that (due to h...

Mass Setting Permissions on Remote Shares

2 minute read

I was recently asked by one of my teammates to add several NTFS permissions to the root folders of a bunch of shares. Seems easy, but I had two problems:

Get-BigDirectories

1 minute read

Note: This script is better than just ls -rec | measure, because measure measures only one field, and when iterating over many files and directories, every i...

Back to Top ↑

Programming

Timing Execution By Output Lines

1 minute read

The Story Today I got annoyed that some puppet agent runs took me over 90 seconds to complete, even though they actually did nothing (no change was needed). ...

Stsadm / new SPSite is slow

3 minute read

Update: Get the script here The Story A couple of days ago, developer extraordinaire Itay Shakury was doing performance tuning on one of our SharePoint appli...

Back to Top ↑

DNS

DNS Namesake - the DNS MitM

2 minute read

The Story Imagine this situtation: ```text THE WORLD / company.com | A s1.red.company.com A s2.red.company.com … A sN...

DNS Override for a Single Process

1 minute read

The Problem I needed to run a mobile emulator on my laptop, in order to test some DNS server changes before releasing them. However, since the emulator had n...

Lowercasing PTR records in DNS

1 minute read

Recently, one of the IT crowd informed me that he can’t delete some of his PTR records through the DNS management console (dnsmgmt.msc). The record would app...

Back to Top ↑

SQL

Determining Size of all Tables in a Database

less than 1 minute read

Just a quick SQL script to get the rowcount and size data of every table in the current database: CREATE TABLE #sizeof ( name varchar (70), [rows] int, re...

Dumping your MySQL db using PHP

less than 1 minute read

Hi. One of my clients asked me to be able to take manual backups of his DB, and because he wasn’t so technologically-inclined, using the hosting company’s in...

Speed boosting disconnected environments

less than 1 minute read

Hi there. Not a while ago, I’ve created a post about stsadm.exe / new SPSite() being slow in disconnected environments. Just wanted to point out that I’ve tr...

Querying SQL Servers

1 minute read

Before I had a chance to study Microsoft’s SQL Server Management Studio (SSMS)’s Powershell SnapIn, I needed to grab some data from an SQL DB. I ended up cre...

Back to Top ↑

Performance

Keeping Windows Awake (with PowerShell)

3 minute read

The story I got a new game on Steam and got set to downloading it. For some reason, Steam and Windows have decided that it’s better to save some electricity ...

Linux and SSDs - Should You TRIM?

3 minute read

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution. What is TRIM? As a Windows sysadmin, I didn...

Testing actual SMB version

1 minute read

Ever since I got employed in my present company, I’ve been told that our NetApp Filer supports SMB2 when used as NAS. I was always skeptic of that (due to h...

Stsadm / new SPSite is slow

3 minute read

Update: Get the script here The Story A couple of days ago, developer extraordinaire Itay Shakury was doing performance tuning on one of our SharePoint appli...

Back to Top ↑

PHP

Extending Yii’s Web Application Creation

1 minute read

I found out that after creating my Yii Applications through Yiic.bat, I tend to modify the same things in all of them (adding .htaccess files for pretty urls...

Creating a common Yii code directory

less than 1 minute read

Yii natively supports code recycling, by allowing you to store common code in modules, widgets etc. However, to share code between applications, you still ha...

Dumping your MySQL db using PHP

less than 1 minute read

Hi. One of my clients asked me to be able to take manual backups of his DB, and because he wasn’t so technologically-inclined, using the hosting company’s in...

Back to Top ↑

HTML

Fixing Ugly Hebrew on Ubuntu + Firefox

less than 1 minute read

The default viewing experience, when visiting some Hebrew sites when using Firefox on Ubuntu, is quite unsightly. If we check Ynet.co.il, a news site, we’ll ...

Avoiding Text Overflow with Prettify on Blogger

less than 1 minute read

I’m currently testing Prettify to replace SyntaxHighlighter as the syntax-highlighting solution in my blog. By the way, it’s nothing critical, but Blogger’s ...

Wget in PowerShell v3

less than 1 minute read

I’ve been envying my *nix brethren for having Wget for a long time. To get the contents of a web page or download a file using http I had to use workarounds ...

Making your pages more Facebook shareable

less than 1 minute read

I’m working on a project involving Gallery 3, and one of my goals was tight Facebook integration. Today I’ve wanted to make sure that when someone shares a p...

Back to Top ↑

Raspberry Pi

Setting up Gargoyle as a Time Server

1 minute read

The Story For reasons unknown to me, Debian’s NTP daemon only works on udp port 123, even when operating as a client. This is a problem because my network c...

Setting Up Samba on Raspberry Pi

2 minute read

After setting up my rPi TorrentBox, I wanted to let my family access the downloaded files. Since they use Windows (and I don’t want to bother their systems w...

Back to Top ↑

raspberrySeed

Setting up Gargoyle as a Time Server

1 minute read

The Story For reasons unknown to me, Debian’s NTP daemon only works on udp port 123, even when operating as a client. This is a problem because my network c...

Setting Up Samba on Raspberry Pi

2 minute read

After setting up my rPi TorrentBox, I wanted to let my family access the downloaded files. Since they use Windows (and I don’t want to bother their systems w...

Back to Top ↑

Debian

Linux and SSDs - Should You TRIM?

3 minute read

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution. What is TRIM? As a Windows sysadmin, I didn...

Why Pinning

2 minute read

There are plenty of guides about apt pinning, but no one really explains the motivation to do so. It took me some time to understand that, so I thought I’d w...

My Pinning Guidelines

4 minute read

In my previous post about pinning I talked about the reasons to configure apt pinning. This post details my logic about what and how to pin.

Adding Repositories for Inspection

less than 1 minute read

Sometime I want to inspect software repositories. However, I don’t want my machine to actually install anything from it. To do so, I made a small bash functi...

Setting up Gargoyle as a Time Server

1 minute read

The Story For reasons unknown to me, Debian’s NTP daemon only works on udp port 123, even when operating as a client. This is a problem because my network c...

Back to Top ↑

Java

a 1.5GB string

4 minute read

In my previous role, I supported a Java service that operated similarly to RDP or Citrix by enabling remote UI functionality. This service relied on sessions...

Writing Complex Scripts in HBase Shell

1 minute read

The Story HBase installations include a shell for running arbitrary commands. For instance, if you want to view all of your snapshots, you can do something l...

Locking Down Jenkins’ Authentication

4 minute read

Update 19.02.15 After posting my script in the Jenkins mailing list, I was told about a simpler way for implmenting my authorization strategy. I’m leaving th...

Back to Top ↑

WSUS

Finding WSUS Clients by SusClientId

less than 1 minute read

Today someone showed me a strange problem - he had servers that recently installed new updates from his WSUS server, but he couldn’t find them in the WSUS co...

Auto-Sorting Computers in WSUS

less than 1 minute read

When I installed my first WSUS server, I liked the idea of auto-assigning computers into different WSUS groups according to domains using the group policy’s ...

Back to Top ↑

BitTorrent

Automaticlly Extracting Downloaded Torrents

1 minute read

As every average geek, I too download torrents (containing only legal, copyright-free material, of course), and most of the time the torrents contain multi-f...

Back to Top ↑

Virtualization

Installing Growroot on CentOS

4 minute read

The story I currently work with CentOS on Amazon EC2. As I previously written, The HVM version of the AMI is created with a partitioned disk, instead of havi...

Resizing AWS root EBS in CentOS HVM

3 minute read

Update 04.07.15 This method doesn’t work anymore because of some weird AWS restriction, which says you can’t connect the root device of a marketplace AMI (li...

AWS’s Block Device Mapping in CentOS

2 minute read

The Story I’m using Amazon’s EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, epheme...

Back to Top ↑

Networking

Troubleshooting StatsD

1 minute read

About StatsD StatsD is a tool developed by Etsy and Flickr (complicated story). Its main use is providing a middleman for Graphite, which is a real-time grap...

SSH vs OpenVPN for Tunneling

5 minute read

Update 28.01.16 I found some sites referring to this post. Below are the common complaints I saw, and my replies:

Validating network segments using Puppet

1 minute read

The Problem When configuring KeepaliveD using Puppet, sometimes an interface name has to be used. Imagine a server with 2 interfaces (eth0,eth1), where one i...

Back to Top ↑

SSH

Merging known_hosts files

2 minute read

The Story Some time ago, some colleague rebuilt several servers and reused their names (think sql1,sql2 etc). Obviously the new servers had different SSH ser...

Generating known_hosts file using Chef

2 minute read

The Story This post relates to my previous post. I was trying to create a script to amend my known_hosts file (where SSH keeps fingerprints of all of the ser...

SSH vs OpenVPN for Tunneling

5 minute read

Update 28.01.16 I found some sites referring to this post. Below are the common complaints I saw, and my replies:

Mass-Checking SSH Connections using Parallel

1 minute read

Today I wanted to make sure I have SSH access to about 100 servers. Obviously, I wasn’t going to verify the list by hand, so I put all of the servers’ names ...

Back to Top ↑

Jenkins

Locking Down Jenkins’ Authentication

4 minute read

Update 19.02.15 After posting my script in the Jenkins mailing list, I was told about a simpler way for implmenting my authorization strategy. I’m leaving th...

Back to Top ↑

CentOS

Using RPMBuild - My Shortlist

3 minute read

The Story I was trying to tinker with Abrt, a daemon in charge of collecting and diagnosing various crashes in RHEL (more on that in a different post). Becau...

Installing Growroot on CentOS

4 minute read

The story I currently work with CentOS on Amazon EC2. As I previously written, The HVM version of the AMI is created with a partitioned disk, instead of havi...

Scripting YUM provides search using Python

1 minute read

Update 24-06-15 Thanks to this page, I fixed my script. It no longer requires root privillages. I also muted informational messages because they were not ver...

Back to Top ↑

SCOM

Speed boosting disconnected environments

less than 1 minute read

Hi there. Not a while ago, I’ve created a post about stsadm.exe / new SPSite() being slow in disconnected environments. Just wanted to point out that I’ve tr...

Back to Top ↑

Terminal Server

Enabling Remote Desktop Remotely

less than 1 minute read

According to this Technet article, to enable remote desktop remotely by using the registry you need to set the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe...

Back to Top ↑

Facebook

Making your pages more Facebook shareable

less than 1 minute read

I’m working on a project involving Gallery 3, and one of my goals was tight Facebook integration. Today I’ve wanted to make sure that when someone shares a p...

Back to Top ↑

Firewall

Network Monitor capture filter limitations

1 minute read

I recently had to deal with some network traffic issues, so naturally I turned to NetMon. My problem was with some TCP packets not reaching their destination...

Setting Dynamic RPC Port Ranges

3 minute read

We recently had to manually set the dynamic RPC port range in our servers, mainly because Exchange 2010 sets the port range so wide that the firewall guys (r...

Back to Top ↑

Office

CSV Tricks

1 minute read

The Story I’ve been requested to recreate some spreadsheet for our execs. Being annoying as usual, I made it a point to only use scripting to build the table...

Reverse Lookup in SharePoint 2010

1 minute read

Every SharePoint noob knows that one can create list lookup relationships, like specifying that a book belongs in a specific bookshelf. What I didn’t know un...

Back to Top ↑

Yii

Extending Yii’s Web Application Creation

1 minute read

I found out that after creating my Yii Applications through Yiic.bat, I tend to modify the same things in all of them (adding .htaccess files for pretty urls...

Creating a common Yii code directory

less than 1 minute read

Yii natively supports code recycling, by allowing you to store common code in modules, widgets etc. However, to share code between applications, you still ha...

Back to Top ↑

Power Management

Keeping Windows Awake (with PowerShell)

3 minute read

The story I got a new game on Steam and got set to downloading it. For some reason, Steam and Windows have decided that it’s better to save some electricity ...

setspn Duplicates and Case Sensitivity

less than 1 minute read

Today I found out that the command I use to find duplicate SPNs, setspn -x is case sensitive, meaning that the following SPNs don’t count as duplicates: HOS...

Back to Top ↑

Deluge

Back to Top ↑

Ubuntu

Linux and SSDs - Should You TRIM?

3 minute read

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution. What is TRIM? As a Windows sysadmin, I didn...

Fixing Ugly Hebrew on Ubuntu + Firefox

less than 1 minute read

The default viewing experience, when visiting some Hebrew sites when using Firefox on Ubuntu, is quite unsightly. If we check Ynet.co.il, a news site, we’ll ...

Back to Top ↑

Perl

Resizing AWS root EBS in CentOS HVM

3 minute read

Update 04.07.15 This method doesn’t work anymore because of some weird AWS restriction, which says you can’t connect the root device of a marketplace AMI (li...

AWS’s Block Device Mapping in CentOS

2 minute read

The Story I’m using Amazon’s EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, epheme...

Timing Execution By Output Lines

1 minute read

The Story Today I got annoyed that some puppet agent runs took me over 90 seconds to complete, even though they actually did nothing (no change was needed). ...

Back to Top ↑

Apt

Why Pinning

2 minute read

There are plenty of guides about apt pinning, but no one really explains the motivation to do so. It took me some time to understand that, so I thought I’d w...

My Pinning Guidelines

4 minute read

In my previous post about pinning I talked about the reasons to configure apt pinning. This post details my logic about what and how to pin.

Adding Repositories for Inspection

less than 1 minute read

Sometime I want to inspect software repositories. However, I don’t want my machine to actually install anything from it. To do so, I made a small bash functi...

Back to Top ↑

scripts

Adding a child element in XSLT

1 minute read

I recently had to edit a big XML file, and add a child elemnt to every element within. To simplify matters, say I had something like this: <?xml version="...

Preparing Certificate files for Nginx

1 minute read

The Story When installing SSL certificates for nginx, assuming you’re using certificate hierarchy (and not a self-signed ceritificate), you’re required to co...

Batch fitting pictures in ImageMagick

1 minute read

I recently bought a digital frame for some of my more elderly relatives. The frame’s firmware was quite retarded, and I had 2 issues with it:

Back to Top ↑

HBase

Writing Complex Scripts in HBase Shell

1 minute read

The Story HBase installations include a shell for running arbitrary commands. For instance, if you want to view all of your snapshots, you can do something l...

Init file for HBase Thrift Server

2 minute read

As part of our HBase setup, we run Thrift servers. This is pretty simple, except for the init files. Since we’re running Thrift standalone (and not as part o...

Back to Top ↑

PKI

Stsadm / new SPSite is slow

3 minute read

Update: Get the script here The Story A couple of days ago, developer extraordinaire Itay Shakury was doing performance tuning on one of our SharePoint appli...

Back to Top ↑

Exchange

Back to Top ↑

IIS

Back to Top ↑

Calendar

Back to Top ↑

NetApp

Testing actual SMB version

1 minute read

Ever since I got employed in my present company, I’ve been told that our NetApp Filer supports SMB2 when used as NAS. I was always skeptic of that (due to h...

Mass Setting Permissions on Remote Shares

2 minute read

I was recently asked by one of my teammates to add several NTFS permissions to the root folders of a bunch of shares. Seems easy, but I had two problems:

Back to Top ↑

SMB

Setting Up Samba on Raspberry Pi

2 minute read

After setting up my rPi TorrentBox, I wanted to let my family access the downloaded files. Since they use Windows (and I don’t want to bother their systems w...

Testing actual SMB version

1 minute read

Ever since I got employed in my present company, I’ve been told that our NetApp Filer supports SMB2 when used as NAS. I was always skeptic of that (due to h...

Back to Top ↑

TCP

Network Monitor capture filter limitations

1 minute read

I recently had to deal with some network traffic issues, so naturally I turned to NetMon. My problem was with some TCP packets not reaching their destination...

Back to Top ↑

Gargoyle

Setting up Gargoyle as a Time Server

1 minute read

The Story For reasons unknown to me, Debian’s NTP daemon only works on udp port 123, even when operating as a client. This is a problem because my network c...

Back to Top ↑

Parallel

Mass-Checking SSH Connections using Parallel

1 minute read

Today I wanted to make sure I have SSH access to about 100 servers. Obviously, I wasn’t going to verify the list by hand, so I put all of the servers’ names ...

Back to Top ↑

Firefox

Fixing Ugly Hebrew on Ubuntu + Firefox

less than 1 minute read

The default viewing experience, when visiting some Hebrew sites when using Firefox on Ubuntu, is quite unsightly. If we check Ynet.co.il, a news site, we’ll ...

Back to Top ↑

linux

The BIG BUTTON with Arduino

1 minute read

I’ve created a dramatic big button, that actually sends key presses to the computer. It’s connected to the computer via USB, and programmable via the same co...

Back to Top ↑

git

Getting Git Submodule Detailed Status

1 minute read

The Story I manage every one of my Chef cookbooks as a single git repository, complying with the BerkShelf paradigm. I keep them all as submodules in a “supe...

Git Prompt Variables

2 minute read

I recently reinstalled my laptop and had to reconfigure my git prompt. I use the git prompt script that is included in Ubuntu’s git package, and integrate it...

Back to Top ↑

bash

Batch fitting pictures in ImageMagick

1 minute read

I recently bought a digital frame for some of my more elderly relatives. The frame’s firmware was quite retarded, and I had 2 issues with it:

Git Prompt Variables

2 minute read

I recently reinstalled my laptop and had to reconfigure my git prompt. I use the git prompt script that is included in Ubuntu’s git package, and integrate it...

Back to Top ↑

Troubleshooting

Chroot Snippet

less than 1 minute read

The Story Some time ago, my PC wouldn’t boot. This was my fault, as I needed to resize some partition, and resizing in Linux really means deleting the partit...

Troubleshooting StatsD

1 minute read

About StatsD StatsD is a tool developed by Etsy and Flickr (complicated story). Its main use is providing a middleman for Graphite, which is a real-time grap...

Back to Top ↑

StatsD

Troubleshooting StatsD

1 minute read

About StatsD StatsD is a tool developed by Etsy and Flickr (complicated story). Its main use is providing a middleman for Graphite, which is a real-time grap...

Back to Top ↑

Graphite

Migrating Graphite’s Dashboards

less than 1 minute read

I just made a small script to migrate dashboards between two graphite servers. Couldn’t find a similar one anywhere, so I thought I’d upload it. Note it’s us...

Back to Top ↑

Vagrant

Running external Ruby code from Vagrant

6 minute read

The Story Like a lot of Chef users, I’m using Vagrant for testing my cookbooks. I’m also using Berkshelf for providing the Vagrant box with the cookbooks it ...

Chef Snippets

1 minute read

I thought I’d upload some interesting Chef-related snippets I accumulated.

Back to Top ↑

Scripting

Sortiq - sort, uniq, sort

less than 1 minute read

This is a small snippet I find extremely useful. You should have it in your ~/.bashrc: sortiq() { sort | uniq -c | sort -rn ; } It will count the instances ...

Writing Complex Scripts in HBase Shell

1 minute read

The Story HBase installations include a shell for running arbitrary commands. For instance, if you want to view all of your snapshots, you can do something l...

Back to Top ↑

Docker

Quick Docker Compose commands for ECS

less than 1 minute read

I’m pretty new to Dockering in the wild, and I’m trying to use the new ECS integration to push all of my tiny app to the cloud.

Back to Top ↑

NTFRS

Testing stranded group policies

1 minute read

Ever had GPO Version differences between the AD and the Sysvol? Sure, you might have a healthy FRS/DFSR architecture, but the replication takes time. It’s an...

Back to Top ↑

Failover Cluster

2008 Clusters can’t change password

1 minute read

Last week MS’s PFE Moti Bani and me solved a problem that bugged me for ~ a year - since the day we’ve started deploying 2008 clusters in our production envi...

Back to Top ↑

Internet Explorer

Internet Explorer and SPNs

less than 1 minute read

After learning how SPNs work (read my “Who? Why? Where” to learn what’s an SPN), I was frustrated to find out that I can’t implement my experience in the rea...

Back to Top ↑

Backups

Dumping your MySQL db using PHP

less than 1 minute read

Hi. One of my clients asked me to be able to take manual backups of his DB, and because he wasn’t so technologically-inclined, using the hosting company’s in...

Back to Top ↑

Apache

Google Friendly Apache Domain Migration

2 minute read

I recently migrated a domain for a client, and did it like a noob (as in simply copying the db and files, making sure everything’s working, and then shutting...

Back to Top ↑

Google

Google Friendly Apache Domain Migration

2 minute read

I recently migrated a domain for a client, and did it like a noob (as in simply copying the db and files, making sure everything’s working, and then shutting...

Back to Top ↑

ACS

Back to Top ↑

MySQL

Back to Top ↑

RSS

Back to Top ↑

iCal

Back to Top ↑

Proxy

Creating proxied http requests with PowerShell

less than 1 minute read

I’m working on some sort of HTTP proxy (maybe more details about it later), and to test it I’ve created a short PowerShell script. Note it also performs basi...

Back to Top ↑

VMware

Back to Top ↑

ASP.net

Back to Top ↑

Web.Config

Back to Top ↑

CIFS

Testing actual SMB version

1 minute read

Ever since I got employed in my present company, I’ve been told that our NetApp Filer supports SMB2 when used as NAS. I was always skeptic of that (due to h...

Back to Top ↑

WinRM

Back to Top ↑

Network Monitor

Network Monitor capture filter limitations

1 minute read

I recently had to deal with some network traffic issues, so naturally I turned to NetMon. My problem was with some TCP packets not reaching their destination...

Back to Top ↑

WMI

Back to Top ↑

W32tm

Back to Top ↑

DST

Back to Top ↑

Regular Expressions

Back to Top ↑

BitLocker

Back to Top ↑

Prettify

Avoiding Text Overflow with Prettify on Blogger

less than 1 minute read

I’m currently testing Prettify to replace SyntaxHighlighter as the syntax-highlighting solution in my blog. By the way, it’s nothing critical, but Blogger’s ...

Back to Top ↑

CSS

Avoiding Text Overflow with Prettify on Blogger

less than 1 minute read

I’m currently testing Prettify to replace SyntaxHighlighter as the syntax-highlighting solution in my blog. By the way, it’s nothing critical, but Blogger’s ...

Back to Top ↑

Blog

Avoiding Text Overflow with Prettify on Blogger

less than 1 minute read

I’m currently testing Prettify to replace SyntaxHighlighter as the syntax-highlighting solution in my blog. By the way, it’s nothing critical, but Blogger’s ...

Back to Top ↑

Samba

Setting Up Samba on Raspberry Pi

2 minute read

After setting up my rPi TorrentBox, I wanted to let my family access the downloaded files. Since they use Windows (and I don’t want to bother their systems w...

Back to Top ↑

Delegation

Finding Accounts Trusted for Delegation

2 minute read

As part of a security audit, I was asked to help in finding all accounts marked with “Trusted for Delegation” What is “Trust for Delegation” You can try rea...

Back to Top ↑

.NET framework

Back to Top ↑

XML

Back to Top ↑

DDNS

Back to Top ↑

Unity

Back to Top ↑

udev

Back to Top ↑

Fonts

Fixing Ugly Hebrew on Ubuntu + Firefox

less than 1 minute read

The default viewing experience, when visiting some Hebrew sites when using Firefox on Ubuntu, is quite unsightly. If we check Ynet.co.il, a news site, we’ll ...

Back to Top ↑

Development

Back to Top ↑

NoScript

Back to Top ↑

gdb

Back to Top ↑

Debugging

Back to Top ↑

NTP

Setting up Gargoyle as a Time Server

1 minute read

The Story For reasons unknown to me, Debian’s NTP daemon only works on udp port 123, even when operating as a client. This is a problem because my network c...

Back to Top ↑

Apt Pinning

Adding Repositories for Inspection

less than 1 minute read

Sometime I want to inspect software repositories. However, I don’t want my machine to actually install anything from it. To do so, I made a small bash functi...

Back to Top ↑

Web

Back to Top ↑

curl

Back to Top ↑

Puppet

Validating network segments using Puppet

1 minute read

The Problem When configuring KeepaliveD using Puppet, sometimes an interface name has to be used. Imagine a server with 2 interfaces (eth0,eth1), where one i...

Back to Top ↑

Regex

Validating network segments using Puppet

1 minute read

The Problem When configuring KeepaliveD using Puppet, sometimes an interface name has to be used. Imagine a server with 2 interfaces (eth0,eth1), where one i...

Back to Top ↑

CSV

CSV Tricks

1 minute read

The Story I’ve been requested to recreate some spreadsheet for our execs. Being annoying as usual, I made it a point to only use scripting to build the table...

Back to Top ↑

Spreadsheets

CSV Tricks

1 minute read

The Story I’ve been requested to recreate some spreadsheet for our execs. Being annoying as usual, I made it a point to only use scripting to build the table...

Back to Top ↑

LibreOffice

CSV Tricks

1 minute read

The Story I’ve been requested to recreate some spreadsheet for our execs. Being annoying as usual, I made it a point to only use scripting to build the table...

Back to Top ↑

chef

Getting Git Submodule Detailed Status

1 minute read

The Story I manage every one of my Chef cookbooks as a single git repository, complying with the BerkShelf paradigm. I keep them all as submodules in a “supe...

Back to Top ↑

Boot

Booting with UUID without initramfs

2 minute read

The Story I recently wiped my CubieTruck (a single board computer, like RaspberryPi), and tried installing the root filesystem on a hard drive instead of the...

Back to Top ↑

ARM

Booting with UUID without initramfs

2 minute read

The Story I recently wiped my CubieTruck (a single board computer, like RaspberryPi), and tried installing the root filesystem on a hard drive instead of the...

Back to Top ↑

Storage

Resizing AWS root EBS in CentOS HVM

3 minute read

Update 04.07.15 This method doesn’t work anymore because of some weird AWS restriction, which says you can’t connect the root device of a marketplace AMI (li...

Back to Top ↑

ImageMagick

Batch fitting pictures in ImageMagick

1 minute read

I recently bought a digital frame for some of my more elderly relatives. The frame’s firmware was quite retarded, and I had 2 issues with it:

Back to Top ↑

images

Batch fitting pictures in ImageMagick

1 minute read

I recently bought a digital frame for some of my more elderly relatives. The frame’s firmware was quite retarded, and I had 2 issues with it:

Back to Top ↑

SysVInit

Init file for HBase Thrift Server

2 minute read

As part of our HBase setup, we run Thrift servers. This is pretty simple, except for the init files. Since we’re running Thrift standalone (and not as part o...

Back to Top ↑

Script

Appending Newline to File Ends with Ruby

less than 1 minute read

I recently took over managing some config files from my dev colleagues. I was extremely annoyed to be reminded that Notepad (Windows’ text editor) does 2 maj...

Back to Top ↑

EC2

Managing EC2 reservations with Scripts

2 minute read

The Story Since we tend to hold our AWS EC2 VMs for a long time, we usually reserve them. Reservations are like pre-buying instances - you pay AWS ahead of t...

Back to Top ↑

Disk

Installing Growroot on CentOS

4 minute read

The story I currently work with CentOS on Amazon EC2. As I previously written, The HVM version of the AMI is created with a partitioned disk, instead of havi...

Back to Top ↑

nginx

Preparing Certificate files for Nginx

1 minute read

The Story When installing SSL certificates for nginx, assuming you’re using certificate hierarchy (and not a self-signed ceritificate), you’re required to co...

Back to Top ↑

security

Preparing Certificate files for Nginx

1 minute read

The Story When installing SSL certificates for nginx, assuming you’re using certificate hierarchy (and not a self-signed ceritificate), you’re required to co...

Back to Top ↑

ssl

Preparing Certificate files for Nginx

1 minute read

The Story When installing SSL certificates for nginx, assuming you’re using certificate hierarchy (and not a self-signed ceritificate), you’re required to co...

Back to Top ↑

ruby

Preparing Certificate files for Nginx

1 minute read

The Story When installing SSL certificates for nginx, assuming you’re using certificate hierarchy (and not a self-signed ceritificate), you’re required to co...

Back to Top ↑

PYthon

Back to Top ↑

Monitoring

Back to Top ↑

RPM

Using RPMBuild - My Shortlist

3 minute read

The Story I was trying to tinker with Abrt, a daemon in charge of collecting and diagnosing various crashes in RHEL (more on that in a different post). Becau...

Back to Top ↑

RHEL

Using RPMBuild - My Shortlist

3 minute read

The Story I was trying to tinker with Abrt, a daemon in charge of collecting and diagnosing various crashes in RHEL (more on that in a different post). Becau...

Back to Top ↑

Building

Using RPMBuild - My Shortlist

3 minute read

The Story I was trying to tinker with Abrt, a daemon in charge of collecting and diagnosing various crashes in RHEL (more on that in a different post). Becau...

Back to Top ↑

Email

Sending mail on coredumps

4 minute read

The Story I recently found out that some of our backend code suffers from memory-related ceashes, namely SIGSEGV (a program tries to access memory it doesn’t...

Back to Top ↑

SSL

Back to Top ↑

xbox

Back to Top ↑

ubuntu

Back to Top ↑

steam

Back to Top ↑

Piculet

Back to Top ↑

Testing

Running Inline DSL in ChefSpec

3 minute read

The Problem I have a pet Chef cookbook in charge of managing SELinux policies in Linux machines (Take a look). Until today I got along fine without testing, ...

Back to Top ↑

ChefSpec

Running Inline DSL in ChefSpec

3 minute read

The Problem I have a pet Chef cookbook in charge of managing SELinux policies in Linux machines (Take a look). Until today I got along fine without testing, ...

Back to Top ↑

Powershell

Back to Top ↑

Licensing

Listing Chef Cookbook Licenses

less than 1 minute read

As part of a compliance check for our company, I was required to print the name/version of all FOSS proejcts I’m using. Most of it was digging around Gemfile...

Back to Top ↑

Packer

Enhancing Packer Templates with eRuby

3 minute read

The Problem Packer is a great tool for creating machine images, and I’m using it to create EC2 AMIs. My issue with it is that Packer is using JSON for input,...

Back to Top ↑

Mutex

Using a global lock in Chef

4 minute read

The Story Our dev team is currently using a Snowflake-like ID generation scheme that looks like this: (Diagram by Elad Rosenhim, architect and companion at ...

Back to Top ↑

Lock

Using a global lock in Chef

4 minute read

The Story Our dev team is currently using a Snowflake-like ID generation scheme that looks like this: (Diagram by Elad Rosenhim, architect and companion at ...

Back to Top ↑

Groovy

Back to Top ↑

Billing

Parsing AWS billing

3 minute read

The Story I never understood the AWS billing very well and happily left it to my CTO. A couple of days ago, however, my CTO secretly told me he’s mainly inte...

Back to Top ↑

Grafana

Migrating Grafana’s Dashboards

less than 1 minute read

Similar to my Graphite dashboard migration script, I made a Grafana one. I’m targeting Grafana v2+. Note it’s using http for its HTTP calls. ```ruby old_serv...

Back to Top ↑

Shell

Filtering in Shell

1 minute read

Today I told someone that a feature I’m missing in Bash is filtering. Then I thought about how much I miss it, so I went ahead and “implemented” it.

Back to Top ↑

Pip

Dry Run for Python Pip

3 minute read

As I wrote some time ago, I started my own python cookbook for Chef because I didn’t like the direction the “default” one was going. I recently added a new f...

Back to Top ↑

C

DNS Override for a Single Process

1 minute read

The Problem I needed to run a mobile emulator on my laptop, in order to test some DNS server changes before releasing them. However, since the emulator had n...

Back to Top ↑

BeautifulSoup

Back to Top ↑

Graphing

Populating a NetworkX graph with a scanner

less than 1 minute read

I had a graph living outside Pythonland (a commit tree with dependencies) and wanted to do graphy things to it. To do that, I first had to put the data into ...

Back to Top ↑

Disqus

Disqus instead of Juvia

less than 1 minute read

TL;DR: I switched from Juvia to Disqus after losing all of my blog’s comments

Back to Top ↑

Rambling

Disqus instead of Juvia

less than 1 minute read

TL;DR: I switched from Juvia to Disqus after losing all of my blog’s comments

Back to Top ↑

XSLT

Adding a child element in XSLT

1 minute read

I recently had to edit a big XML file, and add a child elemnt to every element within. To simplify matters, say I had something like this: <?xml version="...

Back to Top ↑

arduino

The BIG BUTTON with Arduino

1 minute read

I’ve created a dramatic big button, that actually sends key presses to the computer. It’s connected to the computer via USB, and programmable via the same co...

Back to Top ↑

Arduino

Arduino Mouse Mover

less than 1 minute read

I have a friend who is working from home. This friend has a manager who’s way of measuring people’s productivity is ensuring said people are active on Slack....

Back to Top ↑

Israel

Back to Top ↑

Sapling

Sapling Commands

less than 1 minute read

Sapling (the Facebook-released SCM) is great, but the docs are not-great. I thought I’d list some commands it took me a while to undertand, for me and for ot...

Back to Top ↑

Git

Sapling Commands

less than 1 minute read

Sapling (the Facebook-released SCM) is great, but the docs are not-great. I thought I’d list some commands it took me a while to undertand, for me and for ot...

Back to Top ↑

Android

Get Android App Sizes with ADB

1 minute read

Upon receiving a notification from my NVidia Shield indicating that it was running low on storage space, I attempted to use the device’s interface to trouble...

Back to Top ↑

JQ

Get Android App Sizes with ADB

1 minute read

Upon receiving a notification from my NVidia Shield indicating that it was running low on storage space, I attempted to use the device’s interface to trouble...

Back to Top ↑

ops

Is this really an emergency?

6 minute read

One of the teams I worked with would do an “engineering pain-point” survey twice a year. During one of those surveys, the main complaint was that on-calls ha...

Back to Top ↑

PDF

Bash “Keep or Delete” script for PDFs

1 minute read

I recently discovered that I had over 100 PDFs in my “Downloads” directory and needed to determine which ones I wanted to keep. Instead of spending 10 minute...

Back to Top ↑

WSL

WSL for non-programming security analysts

3 minute read

I have a friend who isn’t a developer and believes that coding is beyond their grasp. They work as a security analyst and prefer using Windows as their opera...

Back to Top ↑