-
Create work for yourself; don’t wait for work to be assigned to you.
-
Take an active role in all your endeavours, not a passive one.
-
Seek out large and complex jobs. Trivial tasks debase you.
-
Welcome difficult assignments. Choose them. Progress lies in accomplishing difficult work.
-
Once you begin a task, complete it. Never give up.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$UID" != "0" ] | |
then | |
echo "You have to be root" >&2 | |
exit 1 | |
fi | |
CHROOT=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="html" indent="yes" /> | |
<xsl:template match="/"> | |
<html> | |
<body> | |
<h1>Statistics</h1> | |
<p>Total codebase size: <xsl:value-of select="//CodebaseCost"/></p> | |
<p>Code to analyze: <xsl:value-of select="//TotalDuplicatesCost"/></p> | |
<p>Total size of duplicated fragments: <xsl:value-of select="//CodebaseCost" /></p> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit
autopy - simple, cross-platform GUI automation toolkit. MIT - https://github.com/msanders/autopy/
- 432 stars, 102 forks, 2950 monthly downloads at 2015-05-13
- GUI toolkit agnostic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// profiling of HighResolutionTimer implementation | |
// https://gist.github.com/DraTeots/436019368d32007284f8a12f1ba0f545 | |
using System; | |
using System.Diagnostics; | |
using System.Globalization; | |
using System.IO; | |
using System.Text; | |
using System.Threading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demonstration video can be found at: https://youtu.be/roAerKVfq-Y | |
// StopEC2Instance | |
const AWS = require('aws-sdk'); | |
exports.handler = (event, context, callback) => { | |
const ec2 = new AWS.EC2({ region: event.instanceRegion }); | |
ec2.stopInstances({ InstanceIds: [event.instanceId] }).promise() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
which ansible >/dev/null 2>&1 | |
if [ $? -ne 0 ]; | |
then | |
echo "Installing Ansible..." | |
sleep 5 | |
pushd . | |
cd ~ | |
pacman -S libyaml-devel python2 tar libffi libffi-devel gcc pkg-config make openssl-devel openssh libcrypt-devel --noconfirm --needed | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vim Cheatsheet | |
>Disclaimer: This cheatsheet is summarized from personal experience and other online tutorials. It should not be considered as an official advice. | |
## Global | |
```bash | |
:help keyword # open help for keyword | |
:o file # open file | |
:saveas file # save file as | |
:close # close current pane |
OlderNewer