Skip to content

Instantly share code, notes, and snippets.

View syrxw's full-sized avatar
🏠
Working from home

手艺人小王 syrxw

🏠
Working from home
  • Hefei
View GitHub Profile
<h1>{{post.title}}</h1>
{{post.content}}
angular.module('app', ['ngRoute'])
.config(function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider
.when('/', {
templateUrl: myLocalized.partials + 'main.html',
controller: 'Main'
})
.when('/:ID', {
<h1>{{post.title}}</h1>
<div ng-bind-html="post.content"></div>
<?php
function my_scripts() {
wp_register_script(
'angularjs',
get_stylesheet_directory_uri() . '/bower_components/angular/angular.min.js'
);
wp_register_script(
angular.module('app', ['ngRoute', 'ngSanitize'])
// ...
scripts.js
<h1>{{post.title}}</h1>
<div ng-bind-html="post.content | toTrusted"></div>
@syrxw
syrxw / svg.vue
Last active November 24, 2018 05:36
vue+svg 实现缩放
<template>
<svg width="800px" height="800px" version="1.1"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800">
<g class="port_output" style="pointer-events: all;">
<rect fill="#ddd" stroke-width="1.5"
:x="listData['001'].x" :y="listData['001'].y"
:width="listData['001'].width" :height="listData['001'].height"
:transform="listData['001'].transform"
style="vector-effect: non-scaling-stroke"
class="port" @click="elementClick($event,'001')" stroke-dasharray="none" stroke="#000"></rect>
@syrxw
syrxw / drr.vue
Last active December 20, 2018 02:29
缩放插件
<template>
<div class="container">
<div class="wrap">
<div class="d1" @mousedown="eleDown" :style="style">
</div>
</div>
<!--drr-->
@syrxw
syrxw / lp.py
Created January 18, 2019 09:30
楼盘爬虫
import requests
from datetime import datetime
import time
import urllib
import re
import os
import sys
from bs4 import BeautifulSoup
from openpyxl import Workbook