mkdir -m 700 /root/.ssh
echo "my public key" > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
restorecon -r /root/.ssh
This file contains hidden or 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 | |
# Source: | |
# https://gist.github.com/ericharth/8334664 | |
# | |
# Thanks: | |
# https://github.com/anderssonjohan | |
# | |
# Usage: | |
# ./createcertfilesfrompfx.sh /path/to/domain.pfx | |
# |
This file contains hidden or 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
# pip install django | |
# pip install clipboard | |
# pip install unidecode | |
from django.template import defaultfilters | |
import clipboard | |
from unidecode import unidecode | |
while True: | |
title = input("Input title: ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export default class ComponentName extends React.Component { | |
componentDidMount() { | |
let children = this.collectChildren(this, (child) => { | |
return 'object' === typeof child; | |
}); | |
children = children.map(child => { |
This file contains hidden or 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
"use strict"; | |
const | |
assert = require('assert'), | |
request = require('request'), | |
config = require('../config'), | |
_ = ''; | |
const foursq = { |
This file contains hidden or 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
<!-- Example Usage --> | |
<div class="form-group col-sm-6"> | |
<label class="control-label">Link <sup class="alert-danger">*</sup></label> | |
<div ng-bind="item.url" onclick="selectAll(this);" class="form-control"></div> | |
</div> |
This file contains hidden or 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
navigator.geolocation.getCurrentPosition(function(geopos){ | |
var coords = geopos.coords; | |
console.log('https://maps.google.com/?q='+coords.latitude+','+coords.longitude); | |
}); |
This file contains hidden or 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
// #maincontent > div > div.dl-wrapper.normal-view > div > div:nth-child(2) > div > table > tbody:nth-child(3) > tr:nth-child(1) > td.domain-name.form > p:nth-child(2) > strong | |
// #maincontent > div > div.dl-wrapper.normal-view > div > div:nth-child(2) > div > table > tbody:nth-child(3) > tr:nth-child(1) > td.expiring > p > b | |
var list = $('#maincontent > div > div.dl-wrapper.normal-view > div > div:nth-child(2) > div > table tr.item') | |
.map(function(idx, item){ | |
return { | |
'domain': $('td.domain-name.form > p:nth-child(2) > strong', item).text(), | |
'expiring': $('td.expiring > p > b', item).text() |