Skip to content

Instantly share code, notes, and snippets.

@oblank
oblank / removeAd
Created February 26, 2024 03:59
removeAd
// 获取要移除的 meta 元素
var metaToRemove = document.querySelector('meta[name="apple-itunes-app"]');
// 检查是否存在该 meta 元素
if (metaToRemove) {
// 从其父元素中移除该 meta 元素
metaToRemove.parentNode.removeChild(metaToRemove);
}
0xEBB63c421ef7514405b0CF8085c9aE167cdD1F34
ebb63c421ef7514405b0cf8085c9ae167cdd1f34
@oblank
oblank / le-renew-webroot
Last active December 7, 2016 02:19 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file="/etc/le-renew-webroot.ini"
le_path='/usr/local/bin/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"
@oblank
oblank / redis2txt.rb
Created July 8, 2016 06:32 — forked from nono/redis2txt.rb
Export data from redis to a plain text files
#!/usr/bin/env ruby
require "redis"
redis = Redis.new
redis.keys("*").each do |key|
val = case redis.type(key)
when "string"
redis.get key
when "list"
! function() {
var e, t = function() {}, o = ["assert", "clear", "count", "debug", "dir", "dirxml", "error", "exception", "group", "groupCollapsed", "groupEnd", "info", "log", "markTimeline", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace", "warn"],
n = o.length;
0 == /mmdebug/.test(location.search) && location.href.indexOf("dev.web.weixin") < 0 && (window.console = {});
for (var r = window.console = window.console || {}; n--;) e = o[n], r[e] || (r[e] = t)
}(), angular.module("Controllers", []), ! function() {
"use strict";
location.href.indexOf("dev.web") < 0 ? angular.module("exceptionOverride", []).factory("$exceptionHandler", [
function() {
return function(e) {
@oblank
oblank / gist:e0f4eb2afd540c8595e4
Created March 11, 2016 11:11
factory create class
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () {
function defineProperties(target, props) {
console.log(target);
console.log(props);
@oblank
oblank / gist:0ba8f9b4f9a4298bc7eb
Created March 7, 2016 09:49
promise 实现 异步加载image
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Promise example</title>
@oblank
oblank / file0.txt
Created February 2, 2016 07:31 — forked from giwa/file0.txt
Install g++/gcc 4.8.2 in CentOS 6.6 ref: http://qiita.com/giwa/items/28c754d8fc2936c0f6d2
$ wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
$ yum install devtoolset-2-gcc devtoolset-2-binutils
$ yum install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran