#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.
相对来说shadowsock则灵活得多.
#解决方案 shadowsock + Privoxy
思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.
import SwiftUI | |
extension Calendar { | |
func generateDates( | |
inside interval: DateInterval, | |
matching components: DateComponents | |
) -> [Date] { | |
var dates: [Date] = [] | |
dates.append(interval.start) |
import 'dart:convert'; | |
import 'dart:math'; | |
import 'dart:typed_data'; | |
import "package:pointycastle/export.dart"; | |
import "package:asn1lib/asn1lib.dart"; | |
List<int> decodePEM(String pem) { | |
var startsWith = [ | |
"-----BEGIN PUBLIC KEY-----", | |
"-----BEGIN PRIVATE KEY-----", |
/** | |
* Based on Vertx EventBus Client (https://github.com/vert-x3/vertx-bus-bower) | |
* Requires SockJS Client | |
*/ | |
import {EventEmitter, Injectable} from "@angular/core"; | |
import * as SockJS from 'sockjs-client'; | |
@Injectable() | |
export class EventBusService { |
package it.reexon.reexon.lib.crypt; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.security.KeyPair; |
#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.
相对来说shadowsock则灵活得多.
#解决方案 shadowsock + Privoxy
思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.
# PostgreSQL can be on a remote server but you'll need root privileges in Linux and superuser in PostgreSQL. | |
# First install build tools | |
sudo su | |
aptitude install build-essential | |
aptitude install postgresql-server-dev-9.4 | |
# Clone and build the PL/pgSQL server-side debugger |
// Simple groovy script to compress / decompress Strings | |
import java.util.zip.GZIPInputStream | |
import java.util.zip.GZIPOutputStream | |
def zip(String s){ | |
def targetStream = new ByteArrayOutputStream() | |
def zipStream = new GZIPOutputStream(targetStream) | |
zipStream.write(s.getBytes('UTF-8')) | |
zipStream.close() | |
def zippedBytes = targetStream.toByteArray() |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
Creating a TimerTask
can not get easier than this thanks to groovy.
import java.util.timer.*
is not required as java.util is already imported.run()
is implemented as closureTo Run this:
groovy https://gist.github.com/kdabir/3176945/raw/timer_example.groovy