Skip to content

Instantly share code, notes, and snippets.

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

greatghoul greatghoul

🏠
Working from home
View GitHub Profile
@greatghoul
greatghoul / README.md
Created January 8, 2019 03:19
Upload Beta 网公共图库随机调用 | 捷径社区

Upload Beta 网公共图库随机调用

https://uploadbeta.com/api/pictures/random/?key=[关键字]

关键字设置为 BingEverydayWallpaperPicture 为必应每日图片

关键字设置:推女郎 - 性感 - 车模 - 美腿 等,有惊喜,你懂的

@greatghoul
greatghoul / README.md
Last active January 8, 2019 03:23
斗图啦的 API | 捷径社区

斗图啦的 API

请求地址

https://www.doutula.com/api/search?keyword=[关键字]&mime=0&page=2

参数说明

@greatghoul
greatghoul / README.md
Last active January 8, 2019 03:06
必应每日图片 API | 捷径社区
https://cn.bing.com/HPImageArchive.aspx?format=js&idx=1&n=2

必应每日图片

  • n - 必要参数。这是输出信息的数量。比如n=1,即为1条,以此类推,至多输出8条。
  • format - 非必要。返回结果的格式,不存在或者等于xml时,输出为xml格式,等于js时,输出json格式
  • idx - 非必要。不存在或者等于0时,输出当天的图片,-1为已经预备用于明天显示的信息,1则为昨天的图片,以此类推,idx最多获取到前16天的图片信息
(function()%7Bvar%20domain%20=%20window.location.href.split(':');
if(domain%5B0%5D%20==%20'http'%20%7C%7C%20domain%5B0%5D%20==%20'https')%7Bif(document.getElementById('shouqu_script'))%7BclearElement();
%7Dvar%20d%20=%20document.createElement('script');
%20d.id%20=%20'shouqu_script';
%20d.setAttribute('charset','utf-8');
%20d.src%20=%20'https://shouqu.me/js/shouqu_tools.js';
%20document.body.insertBefore(d,%20document.body.childNodes%5B0%5D);
%7D%7D)();
// javascript:(function()%7B(function(window%2C%20document%2C%20undefined)%20%7Btry%20%7Bvar%20selectedText%20%3D%20document.getSelection().toString()%3Bif%20(selectedText%20%3D%3D%3D%20'')%20%7BselectedText%20%3D%20window.location.href%3B%7Dif%20(selectedText%20!%3D%3D%20'')%20%7Bvar%20baseQRUrl%20%3D%20'http%3A%2F%2Fchart.apis.google.com%2Fchart%3Fcht%3Dqr%26chs%3D300x300%26chl%3D'%20%2B%20encodeURIComponent(selectedText)%3Bwindow.open(baseQRUrl%2C%20'_blank'%2C%20'width%3D400%2Cheight%3D400')%3B%7D%7Dcatch%20(e)%20%7B%7D%7D)(window%2C%20document)%7D)()
// https://gist.github.com/lemieuxster/2579060
(function(window, document, undefined) {
try {
var selectedText = document.getSelection().toString();
if (selectedText === '') {
selectedText = window.location.href;
}
if (selectedText !== '') {
@greatghoul
greatghoul / example nginx config.txt
Created June 18, 2018 16:26 — forked from deepak/example nginx config.txt
example nginx config with SSL from LetsEncrypt for a rails app (see steps.txt)
# rails config needs `force_ssl`
# example:
# Force all access to the app over SSL, use Strict-Transport-Security,
# and use secure cookies.
# config.force_ssl = true
# and rails needs some headers to be set, otherwise will be trapped in a redirect loop
# nginx config for headers:
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto https;
{"authors": [{"createdTime": "2018-03-19T12:33:15.000Z", "fields": {"Github": "https://github.com/sciooga", "Name": "sciooga", "extensions": ["recz8wQoqkGqL4eEb"]}, "id": "rec0Zx3HaxoY2Fa7K"}, {"createdTime": "2018-05-03T11:03:28.000Z", "fields": {"Github": "https://github.com/AInoob", "Name": "AInoob", "extensions": ["rec0Dn9EJxyREm6co", "recL1jtZcUpWuLYV2"]}, "id": "rec71NujhFi8G5wl4"}, {"createdTime": "2018-03-18T17:34:19.000Z", "fields": {"Github": "https://github.com/Kenshin", "Name": "kenshin", "extensions": ["recGtmAxC6SGSzooq", "recdxibDuUbDNQB2T", "recmMz6aSMXTwogse"]}, "id": "recHJwoHwEJbX0ztR"}, {"createdTime": "2018-05-03T11:00:40.000Z", "fields": {"Github": "https://github.com/ety001", "Name": "ety001", "extensions": ["recUdQi8tezzAPYKR"]}, "id": "recJPtuv0Le8DqNcZ"}, {"createdTime": "2018-03-18T17:34:19.000Z", "fields": {"Github": "https://github.com/greatghoul", "Name": "greatghoul", "extensions": ["recO6OTgmtTUlxuiR"]}, "id": "recXa6VkoVkKkX3Bu"}, {"createdTime": "2018-05-03T10:54:03.000Z", "f
@greatghoul
greatghoul / profile.js
Last active April 13, 2018 09:40
Script to generate Github Profile and BuyMeACoffee Button
(function() {
var build, ready;
ready = function(fn) {
if ((document.attachEvent ? document.readyState === 'complete' : document.readyState !== 'loading')) {
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
};
version: '2'
services:
postgres:
image: postgres
environment:
POSTGRES_PASSWORD: temp1234
ports:
- 5432:5432
volumes:
- db_data:/var/lib/postgresql