Skip to content

Instantly share code, notes, and snippets.

View itbj's full-sized avatar
🌴
On vacation

taoza itbj

🌴
On vacation
View GitHub Profile
@itbj
itbj / t2.php
Created January 26, 2014 09:17
My PHP application to read file ,then put on the Web Browser. (2014/01/26)
<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 November 19, 2016 17:44
A simple HTTP/1.0 request client. This is a free software code, use fairly!
#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 18:10 — forked from maxivak/_readme.md
Vagrant with Ubuntu 16.04 in VirtualBox

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
-- 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 04:05
VBA code to initialize a PivotTable
'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 June 14, 2019 12:52 — forked from stevehenderson/Setup Pivot Table
VBA code to initialize a PivotTable
'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 June 17, 2015 17:52
EEM Cisco - config change Alert - with email and syslog capturing user name and config commands
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"
@itbj
itbj / Dockerfile
Created February 1, 2020 03:47 — forked from MichalZalecki/Dockerfile
Install oh-my-zsh in Docker
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
<template>
<div>
<form-box title="Hello Form Box" message="A help message" v-on:save="onSave" @clear="onClear">
<b-field label="Name">
<b-input v-model="name"></b-input>
</b-field>
<b-field label="Email">
<b-input v-model="email"></b-input>
</b-field>
</form-box>
@raeq
raeq / strings_00_substring.py
Created July 18, 2020 10:33
Find a needle in a haystack
def sub_00(haystack: str="", needle:str="") -> bool:
return needle in haystack
assert sub_00("the quick brown fox jumped over the lazy dog", "lazy") == True
assert sub_00("the quick brown fox jumped over the lazy dog", "lazys") == False