Skip to content

Instantly share code, notes, and snippets.

@itbj
itbj / t2.php
Created Jan 26, 2014
My PHP application to read file ,then put on the Web Browser. (2014/01/26)
View t2.php
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<body>
<?php
echo "My Cloud App!<br>我的云应用。<br>";
echo $showtime=date("Y-m-d H:i:s");
echo "<hr>";
$filename="yjm.txt";
if (file_exists($filename))
@nvurgaft
nvurgaft / gist:8086853
Last active Nov 19, 2016
A simple HTTP/1.0 request client. This is a free software code, use fairly!
View gist:8086853
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
@itbj
itbj / _readme.md
Created May 8, 2017 — forked from maxivak/_readme.md
Vagrant with Ubuntu 16.04 in VirtualBox
View _readme.md

Setup Ubuntu 16.04 to be used with Vagrant and Virtualbox

Prepare Vagrant box with Ubuntu 16.04

We will use official box "ubuntu/xenial64" and modify it to work with Vagrant.

  • Vagrantfile
View script 21.txt
-- user input - mode
set mode to 2 -- (2 or 3 or 4) if mode is 2, pic1 and pic2 will be used | if mode is 3, pic1,pic2 and pic3 will be used.
-- user input - pics
set pic1 to ""
set pic2 to ""
set pic3 to ""
set pic4 to ""
-- end of user input
if mode is greater than or equal to 2 then
if mode is not greater than 4 then
@stevehenderson
stevehenderson / Setup Pivot Table
Created May 15, 2013
VBA code to initialize a PivotTable
View Setup Pivot Table
'SetupPivot: The following subroutine sets up a pivot table
'
'
' author: steven.henderson@usma.edu
'
'I received assitance from the following site:
'
@itbj
itbj / Setup Pivot Table
Created Jun 14, 2019 — forked from stevehenderson/Setup Pivot Table
VBA code to initialize a PivotTable
View Setup Pivot Table
'SetupPivot: The following subroutine sets up a pivot table
'
'
' author: steven.henderson@usma.edu
'
'I received assitance from the following site:
'
@twr14152
twr14152 / EEM Config-change-alert
Created Jun 17, 2015
EEM Cisco - config change Alert - with email and syslog capturing user name and config commands
View EEM Config-change-alert
archive
log config
logging enable
notify syslog contenttype plaintext
hidekeys
event manager applet Config_Change authorization bypass
event config
action 1.1 cli command "enable"
@anthonyeden
anthonyeden / Python WExpect
Created Jan 18, 2014
Python's PExpect for Microsoft Windows: WExpect
View Python WExpect
"""Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be used for automated software testing. Pexpect is in the spirit of Don
Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python
require TCL and Expect or require C extensions to be compiled. Pexpect does not
use C, Expect, or TCL extensions. It should work on any platform that supports
the standard Python pty module. The Pexpect interface focuses on ease of use so
that simple tasks are easy.
@yaegashi
yaegashi / playbook.yml
Created Oct 14, 2015
Ansible SSH connection using paramiko
View playbook.yml
---
- hosts: all
connection: paramiko
vars:
ansible_ssh_private_key_file: /path/to/private_key
ansible_ssh_pass: passphrase_for_private_key
tasks:
- debug:
msg: hello
@itbj
itbj / Dockerfile
Created Feb 1, 2020 — forked from MichalZalecki/Dockerfile
Install oh-my-zsh in Docker
View Dockerfile
RUN ["apt-get", "update"]
RUN ["apt-get", "install", "-y", "zsh"]
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
# docker exec -it my-app-container /bin/zsh
You can’t perform that action at this time.