Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View cundi's full-sized avatar
🎯
Focusing

m.l cundi

🎯
Focusing
View GitHub Profile
@cundi
cundi / MSO15.11.2Patch
Created October 18, 2015 14:18 — forked from Leask/MSO15.11.2Patch
MSO15.11.2Patch
#!/bin/bash
echo "Patching Microsoft Office Outlook..."
sudo perl -i.bak -pe 's|\x00\x0F\xA3\xCA\x72\x02\x31\xC0|\x00\x0F\xA3\xCA\x72\x02\x90\x90|' /Applications/Microsoft\ Outlook.app/Contents/Frameworks/MicrosoftSetupUI.framework/Versions/Current/MicrosoftSetupUI
sudo codesign -f -s - /Applications/Microsoft\ Outlook.app/Contents/Frameworks/MicrosoftSetupUI.framework
echo "Patching Microsoft Office Word..."
sudo perl -i.bak -pe 's|\x00\x0F\xA3\xCA\x72\x02\x31\xC0|\x00\x0F\xA3\xCA\x72\x02\x90\x90|' /Applications/Microsoft\ Word.app/Contents/Frameworks/MicrosoftSetupUI.framework/Versions/Current/MicrosoftSetupUI
sudo codesign -f -s - /Applications/Microsoft\ Word.app/Contents/Frameworks/MicrosoftSetupUI.framework
@cundi
cundi / fabfile.py
Created May 18, 2017 02:39 — forked from elliottb/fabfile.py
Example Python Fabric deployment script. Deploys code from a deployment box to a remote host. Usage from command line on the deployment box: fab deploy.
from fabric.api import local, run, env, put
import os, time
# remote ssh credentials
env.hosts = ['10.1.1.25']
env.user = 'deploy'
env.password = 'XXXXXXXX' #ssh password for user
# or, specify path to server public key here:
# env.key_filename = ''
@cundi
cundi / server-vars.yml
Created June 2, 2017 11:28 — forked from dangtrinhnt/server-vars.yml
Open edX server-vars.yml variables
# variables common to the lms role, automatically loaded
# when the role is included
---
# These are variables that default to a localhost
# setup and are meant to be overwritten for
# different environments.
#
# Variables in all caps are environment specific
# Lowercase variables are internal to the role
@cundi
cundi / README.rst
Created June 13, 2017 12:39 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@cundi
cundi / bind_socket.py
Created April 12, 2018 06:50 — forked from tuxfight3r/bind_socket.py
python tcp socket client / server examples
#!/usr/bin/python
import socket #for sockets
import sys #for exit
try:
#create an AF_INET, STREAM socket (TCP)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error, msg:
print 'Failed to create socket. Error code: ' + str(msg[0]) + ' , Error message : ' + msg[1]
@cundi
cundi / ansible_api_playbook.py
Created May 8, 2018 14:16 — forked from viper233/ansible_api_playbook.py
Example using Ansible API 2.0 to run a playbook
#!/usr/bin/env python
# stolen from http://stackoverflow.com/questions/27590039/running-ansible-playbook-using-python-api
import os
import sys
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory
@cundi
cundi / what-forces-layout.md
Created June 5, 2018 05:50 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@cundi
cundi / resources.md
Created August 1, 2018 14:05 — forked from fffaraz/resources.md
CS 306 - Linux/UNIX Programming
@cundi
cundi / vsphere_info.py
Created October 31, 2018 05:55 — forked from deviantony/vsphere_info.py
VMWare Vsphere info in Python using pyvmomi
#!/usr/bin/env python
import pyVmomi
import argparse
import atexit
import itertools
from pyVmomi import vim, vmodl
from pyVim.connect import SmartConnect, Disconnect
import humanize
@cundi
cundi / gencert.py
Created November 4, 2018 01:35 — forked from toolness/gencert.py
Python script to create server SSL certs and sign them with a custom CA.
#! /usr/bin/python
"""
This simple script makes it easy to create server certificates
that are signed by your own Certificate Authority.
Mostly, this script just automates the workflow explained
in http://www.tc.umn.edu/~brams006/selfsign.html.
Before using this script, you'll need to create a private