Skip to content

Instantly share code, notes, and snippets.

package com.spring.aws.gateway.controller;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<features.h>
#include<linux/if_packet.h>
#include<linux/if_ether.h>
#include<errno.h>
#include<sys/ioctl.h>
#include<net/if.h>
#include<net/ethernet.h>
@heidsoft
heidsoft / lsniffer.c
Created August 13, 2018 15:42 — forked from fffaraz/lsniffer.c
Packet Sniffer Code in C using Linux Sockets | http://www.binarytides.com/packet-sniffer-code-c-linux/
/*
Packet sniffer using libpcap library
*/
#include<pcap.h>
#include<stdio.h>
#include<stdlib.h> // for exit()
#include<string.h> //for memset
#include<sys/socket.h>
#include<arpa/inet.h> // for inet_ntoa()
@heidsoft
heidsoft / 前端异常监控.md
Created August 24, 2017 08:26 — forked from gwuhaolin/前端异常监控.md
前端异常监控

前端异常监控

为什么需要前端异常监控

如今Web庞大复杂应用场景广泛,再加上各种浏览器造成的环境差异,很难保证我们的页面呈现给每个用户时都是正常的。稳定和准确是每个产品的基础,对于用户直接交互的页面更加显得重要。我们不能等到用户投诉后才知道出现问题,而是应该主动监控尽快暴露出异常。

前端有哪些异常

  • 静态资源加载异常
    • 网络环境恶劣
    • 运营商劫持
    • 文件丢失
@heidsoft
heidsoft / 前端异常监控.md
Created August 24, 2017 08:26 — forked from gwuhaolin/前端异常监控.md
前端异常监控

前端异常监控

为什么需要前端异常监控

如今Web庞大复杂应用场景广泛,再加上各种浏览器造成的环境差异,很难保证我们的页面呈现给每个用户时都是正常的。稳定和准确是每个产品的基础,对于用户直接交互的页面更加显得重要。我们不能等到用户投诉后才知道出现问题,而是应该主动监控尽快暴露出异常。

前端有哪些异常

  • 静态资源加载异常
    • 网络环境恶劣
    • 运营商劫持
    • 文件丢失
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
struct curl_slist *headers = NULL;
curl = curl_easy_init();
@heidsoft
heidsoft / js
Created December 24, 2016 03:55
ui-router 状态路由带参数
// .state('root', {
// url: '/home/:partyID/:partyLocation',
// controller: 'HomeController',
// templateUrl: CmdbConfig.templatePath + 'home/home.html',
// views: {
// "home": {
// templateUrl: CmdbConfig.templatePath + 'menu/menu.html',
// controller: function ($scope, $state,$stateParams,MenuServiceV2) {
// console.log("aaaaaaddddbbbbbb");
// console.log($stateParams);
.directive('repeater', function ($document) {
return {
restrict: 'A',
scope: { colors: "=myColor" },//隔离作用域,使用双向绑定颜色
controller: function( $scope, $element, $attrs, $transclude ) {
console.log( $attrs.repeater + ' (controller)' );
},
compile: function(element, attrs) {
console.log("test repeater....");
console.log(element);
@heidsoft
heidsoft / angularjs $compile 使用.js
Last active December 19, 2016 15:01
angularjs $compile 使用
$("#dynamicContent").html(
$compile(
"<button ng-click='count = count + 1' ng-init='count=0'>Increment</button><span>count: {{count}} </span>"
)(scope)
);