Skip to content

Instantly share code, notes, and snippets.

View bbbenji's full-sized avatar
🛸
Hello, Earth!

Benji bbbenji

🛸
Hello, Earth!
View GitHub Profile
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
/*
* Source:
* https://gist.github.com/CezaryDanielNowak/357e526b759e4614b859
*
* Why do I need it:
* When using NapiProjekt or OpenSubtitles on non-polish Windows machine,
* subtitles has wrong encoding and are hard to read.
*
* How to use:
* - save fix.js somewhere on your drive
@seanmcn
seanmcn / gist:62a021a765ad4f8e593b
Last active February 21, 2024 11:57
The Perfect Web Server - Nginx, Ajenti, Ubuntu
#Insall Ajenti
apt-get update
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list
apt-get update
apt-get install ajenti
service ajenti restart
# Uninstall Apache2
sudo apt-get autoremove && sudo apt-get remove apache2*
@janxb
janxb / ajenti_additional_ftp_users.sh
Last active June 9, 2017 07:58
A Shell Script for adding additional FTP-Users to Ajenti
#!/bin/bash
SET_USERS="usernameone:password:/path/to/web/folder usernametwo:password:/path/to/second/folder"
IFS=' ' read -a USERS <<< "${SET_USERS}"
for SET_USER in ${USERS[@]}; do
IFS=':' read -a USER <<< "${SET_USER}"
NAME=${USER[0]};
PASS=${USER[1]};
DIR=${USER[2]};
(echo $PASS; echo $PASS) | pure-pw useradd $NAME -u www-data -g www-data -d $DIR
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@sebastienvercammen
sebastienvercammen / Code.gs
Last active March 9, 2022 09:58
Nintendo PTC Account Verifier for Gmail v2 with CORS proxy (via Google Scripts & jQuery)
/*
Automatically click all "Verify your email" links in the welcome e-mail from
Nintendo Pokémon Trainer Club's signup e-mails.
Only unread emails in inbox will be processed.
All processed e-mails will be marked as read if verification was successful,
and optionally moved to trash if it's enabled in your settings.
How to use:
1. Login to Gmail
@HeikoMamerow
HeikoMamerow / Nginx-make.txt
Last active February 9, 2022 13:23
Build nginx with Google PageSpeed, Brotli and other modules
How to build your custom Nginx
==============================
Works fine for me with Ubuntu 16.04.
Automated Install with pagespeed module (Google)
------------------------------------------------
If you interested, read the original
Source: https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source
@nonsintetic
nonsintetic / tronxy-pla-s3d.txt
Created July 10, 2017 10:06
TronXY X1 - Simplify3D generic settings for PLA
Extruder:
- Nozzle Diameter: 0.40mm
- Extrusion Multiplier: 1.00 (can fiddle with this: if you get holes in top layers - increase, if you get blobs and the head digs into the current layer - decrease)
- Extrusion Width: auto
- Retraction:
- Distance: 4-6mm or less even
- Extra Restart Dist: 0.5
- Vertical Lift: 0
- Retraction Speed: 3000
- Coast at end - enabled - 0.1mm
@vladkras
vladkras / default.conf
Last active January 17, 2024 09:59
NGINX redirect to app store and google play based on user agent
location = /gotoapp {
if ($http_user_agent ~* "iphone|ipod|ipad|appletv") {
return 301 https://www.apple.com/lae/ios/app-store/;
}
if ($http_user_agent ~* "android") {
return 301 https://play.google.com/store;
}
if ($http_user_agent ~* "Windows") {
return 301 https://www.microsoft.com/store/apps?rtc=1;