Skip to content

Instantly share code, notes, and snippets.

@voluntas
voluntas / sysctl.conf
Created October 14, 2017 13:07 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
cd /Library/Preferences
sudo rm com.sophos.sav.plist

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
@peterjaap
peterjaap / server.blacklist
Last active January 1, 2024 13:39
Bad bot blacklist nginx config file (used on Hypernodes for Magento - place in /data/web/nginx/server.blacklist)
# Main list
if ($http_user_agent ~* (360Spider|80legs.com|Abonti|AcoonBot|Acunetix|adbeat_bot|AddThis.com|adidxbot|ADmantX|AhrefsBot|AngloINFO|Antelope|Applebot|BaiduSpider|BeetleBot|billigerbot|binlar|bitlybot|BlackWidow|BLP_bbot|BoardReader|Bolt\ 0|BOT\ for\ JCE|Bot\ mailto\:craftbot@yahoo\.com|casper|CazoodleBot|CCBot|checkprivacy|ChinaClaw|chromeframe|Clerkbot|Cliqzbot|clshttp|CommonCrawler|comodo|CPython|crawler4j|Crawlera|CRAZYWEBCRAWLER|Curious|Curl|Custo|CWS_proxy|Default\ Browser\ 0|diavol|DigExt|Digincore|DIIbot|DISCo|discobot|DoCoMo|DotBot|Download\ Demon|DTS.Agent|EasouSpider|eCatch|ecxi|EirGrabber|Elmer|EmailCollector|EmailSiphon|EmailWolf|Exabot|ExaleadCloudView|ExpertSearch|ExpertSearchSpider|Express\ WebPictures|extract|ExtractorPro|EyeNetIE|Ezooms|F2S|FastSeek|feedfinder|FeedlyBot|FHscan|finbot|Flamingo_SearchEngine|FlappyBot|FlashGet|flicky|Flipboard|g00g1e|genieo|Genieo|GetRight|GetWeb\!|GigablastOpenSource|Go\-Ahead\-Got\-It|Go\!Zilla|GozaikBot|grab|GrabNet|Grafula|GrapeshotCrawler|GT\:\:
@nnja
nnja / gist:9136152c163091614e70defcf3753d06
Created May 26, 2016 20:25
How to access the raw markdown source for a github wiki page
https://raw.github.com/wiki/user/repo/page.md?login=login&token=token
@anzuwork
anzuwork / !readme.md
Last active January 24, 2017 05:38
How to extract images on starlight stage.

NOT WORKED NOW.

Since the App has changed the DB system.

Will work if a version earlier than 10012760.

現在動きません。

アプリはDBシステムを変更したため。

@jemekite
jemekite / badbot.conf
Created July 25, 2015 13:28
NginX badbot blocker conf
if ($http_user_agent ~ "WebCrawlerJohn|Sphere|OptimizationCrawler|Apache-HttpClient|LinkpadBot|MegaIndex.ru|WeCrawlForThePeace|Xenu|SemanticScholarBot|Domain Re-Animator Bot|proximic|Sosospider|Sogou|Jorgee|ZumBot|MJ12bot|spbot|rojerbot|Exabot|dotbot|gigabot|AhrefsBot|accelobot|searchmetrics|awcheckBot|CompSpyBot|EasouSpider|purebot|Ezooms|SurveyBot|sitebot|dotnetdotcom|dotbot|SolomonoBot|ZmEu|lipperhey|WBSearchBot|Snoopy|AhrefsBot|DinoPing|dataprovider.com|discoverybot|www.integromedb.org|360Spider|80legs|YamanaLab-Robot|ip-web-crawler.com|Aboundex|Sleuth|NCBot|JikeSpider|Curious|visaduhoc.info|SemrushBot|Dow Jones Searchbot|SISTRIX|brandwatch.net|magpie-crawler|YoudaoBot|TurnitinBot|aiHitBot|PeoplePal|EzineArticlesLinkScanner|ProCogSEOBot|ScreenerBot|PagesInventory|SeznamBot|libwww-perl|Lynx|Nutch|Java|SEOstats|Python-urllib|python-requests|HTTP_Request|HTTP_Request2|Zend_Http_Client|Jakarta Commons-HttpClient|The Incutio XML-RPC PHP Library|YisouSpider|SEOENGWorldBot|Netseer|Riddler|CLIPish|proximic|Mail.R
@jackreichert
jackreichert / getKeyVals
Last active March 19, 2020 07:12
This is a swift extension for NSURL so you can parse the query string and get back a dictionary of the variables.
extension NSURL {
func getKeyVals() -> Dictionary<String, String>? {
var results = [String:String]()
var keyValues = self.query?.componentsSeparatedByString("&")
if keyValues?.count > 0 {
for pair in keyValues! {
let kv = pair.componentsSeparatedByString("=")
if kv.count > 1 {
results.updateValue(kv[1], forKey: kv[0])
}
@sawapi
sawapi / AppDelegate.swift
Last active October 25, 2023 09:26
[Swift] Push Notification
//
// AppDelegate.swift
// pushtest
//
// Created by sawapi on 2014/06/08.
// Copyright (c) 2014年 sawapi. All rights reserved.
//
// iOS8用
import UIKit
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@thedamon
thedamon / backbutton close bootstrap modal
Created February 28, 2014 17:59
Cause back button to close Bootstrap modal windows
$('div.modal').on('show', function() {
var modal = this;
var hash = modal.id;
window.location.hash = hash;
window.onhashchange = function() {
if (!location.hash){
$(modal).modal('hide');
}
}
});