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
before_install: | |
- sudo apt-get install python-software-properties | |
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
- sudo apt-get update | |
- sudo apt-get install gcc-5 g++-5 | |
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80 --slave /usr/bin/g++ g++ /usr/bin/g++-5 | |
- sudo update-alternatives --set gcc /usr/bin/gcc-5 |
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
npm list -g --depth 0 |
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
C:\Users\PC\AppData\Roaming\npm | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] |
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 | |
df -h $1 | awk ' | |
BEGIN { ORS = ""; print "[" } | |
/Filesystem/ {next} | |
{ printf "%s{\"fs\": \"%s\", \"size\": \"%s\", \"used\": \"%s\", \"available\": \"%s\"}", | |
separator, $1, $2, $3, $4 | |
separator = ", " | |
} | |
END { print "]" } |
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
// This makes two connections, one to a tcp server, one to an http server (both in server.js) | |
// It fires off a bunch of connections and times the response | |
// Both send strings. | |
const net = require(`net`); | |
const http = require(`http`); | |
function parseIncomingMessage(res) { | |
return new Promise((resolve) => { |
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
# get_ips.sh | |
grep "Failed password for" /var/log/auth.log \ | |
| grep -Po "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" \ | |
| sort \ | |
| uniq -c |
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
@echo off | |
IF %1 == r GOTO first | |
IF %1 == rn GOTO second | |
:first | |
set v1=react | |
GOTO cmd1 | |
:second |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Single Page Apps for GitHub Pages</title> | |
<script type="text/javascript"> | |
// Single Page Apps for GitHub Pages | |
// https://github.com/rafrex/spa-github-pages | |
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License | |
// ---------------------------------------------------------------------- |
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
find . -type d -name 'CVS' -exec rm -r {} + |
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
const app = require('express')(); | |
const bodyParser = require('body-parser'); | |
const ACCOUNT_SID = ''; | |
const AUTH_TOKEN = ''; | |
const FROM_NUMBER = ''; | |
const TwilioClient = require('twilio')(ACCOUNT_SID, AUTH_TOKEN); | |
app.use(bodyParser.json()); |