Skip to content

Instantly share code, notes, and snippets.

@hongyangqin
hongyangqin / GoogleAppsScript2GitHub.gs
Created August 4, 2017 16:15 — forked from mhawksey/GoogleAppsScript2GitHub.gs
Example script that demonstrates how you can commit files to Github using Google Apps Script. If copying into a script project remembers to add a oAuth2 library https://github.com/googlesamples/apps-script-oauth2. More info in this post https://mashe.hawksey.info/?p=17293
/*
To use you need to create an application on Github at https://github.com/settings/developers
The callback in this needs to be set to https://script.google.com/macros/d/{SCRIPT ID}/usercallback
Where {SCRIPT ID} is the ID of the script that is using this library. You can find your script's ID in the Apps Script code editor by clicking on the menu item "File > Project properties".
In this example code I've stored the apllicaitons clientId and clientSecret in the Script Properties:
- git_clientId
- git_clientSecret

使用Eclipse编辑文件经常出现中文乱码或者文件中有中文不能保存的问题,Eclipse提供了灵活的设置文件编码格式的选项,我们可以通过设置编码 格式解决乱码问题。在Eclipse可以从几个层面设置编码格式:Workspace、Project、Content Type、File
本文以Eclipse 3.3(英文)为例加以说明:
1. 设置Workspace的编码格式:
Windows->Preferences... 打开"首选项"窗口,点击左侧导航树到General->Workspace,在右侧视图中找到“Text file encoding”选项设置,一种是默认(Default),另一种是从下拉列表中选择(Other)。Eclipse Workspace默认的编码方式是操作系统的编码格式,这跟操作系统的设置有关系;另外我们可以选择Other单选按钮,然后从按钮右侧的下拉列表中选 择需要的编码格式(GBK、ISO-8859-1、UTF-16、UFT-16 etc.)。
2. 设置Project的编码格式:
在 Workspace中新建的项目默认继承Workspace的编码设置,我们也可以单独更改某个项目的编码格式。右键点击工程,选择 Properties,打开项目属性设置窗口,左侧导航树选择Resource,在右侧视图中找到“Text file encoding”,两种设置项目的编码格式,默认选中的是“Inherited from container (XXX)”(注:XXX为Workspace设置的编码),我们也可以选择其他的编码格式,设置方式同Workspace。

@hongyangqin
hongyangqin / gist:aa0fee4b28607bf7d50579e308f60990
Last active November 19, 2017 11:43
spring-预览应用程序执行流程

2- 预览应用程序执行流程

Spring MVC DispatcherServlet 读取 xml 配置文件的原则:
  • {servlet-name} ==> /WEB-INF/{servlet-name}-servlet.xml

12款助你学编程的免费游戏

在本文中,我们从近200多个网站中,评选出了的12个热门网站。你可以在玩游戏中学习编程。

Mybridge A.I. 基于各种因素也评估了这些网站的内容质量,以确定它们对程序员是有用的。

这些网站专为初、高级程序员而设计,帮助他们学习各种计算机语言。诸如:JavaScript、java、python,PHP,C #等。

让我们一起看看吧!

在玩游戏时,会遇到许多具有挑战性的编码问题,并且支持所有编程语言。

@hongyangqin
hongyangqin / new_gist_file.md
Last active March 11, 2021 08:05
震惊!原来命令行还可以这么玩?!

引言

你是否:

  • 好奇过命令行里那些花里胡哨的进度条是如何实现的?
  • 好奇过Spring Boot为什么能够打印五颜六色的日志?
  • 好奇过Python或者PHP等脚本语言的交互式命令行是如何实现的?
  • 好奇过Vim或者Emacs等在Terminal中的编辑器是怎么实现的?

如果你曾经好奇过,或者被这段话勾起了你的好奇心,那么你绝对不能错过这篇文章!

背景通过本文你可以学到:

深度学习(二十九)Batch Normalization 学习笔记

原创 2016年03月12日 17:00:38

利用telnet发邮件

玩了下telnet发邮件,仅作记录,如有不妥请见谅。

Javaweb开发为什么需要分前后端,放弃原生JSP

转载 2017年01月08日 01:19:13

java web项目为什么我们要放弃jsp?

以前的项目大多数都是java程序猿又当爹又当妈,又搞前端(ajax/jquery/js/html/css等等),又搞后端(java/mysql/Oracle等等)。

随着时代的发展,渐渐的许多大中小公司开始把前后端的界限分的越来越明确,前端工程师只管前端的事情,后端工程师只管后端的事情,正所谓术业有专攻,一个人如果什么都会,那么他毕竟什么都不精。

大中型公司需要专业人才,小公司需要全才,但是对于个人职业发展来说,