Skip to content

Instantly share code, notes, and snippets.

View kopiro's full-sized avatar

Flavio Maria De Stefano kopiro

View GitHub Profile
@saniaky
saniaky / Readme.md
Last active April 23, 2024 00:42
Docker + nginx-proxy + let's encrypt + watchtower + fail2ban

Complete solution for websites hosting

This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.

Features:

  • Automatically detect new containers and reconfigure nginx reverse-proxy
  • Automatically generate/update SSL certificates for all specified containers.
  • Watch for new docker images and update them.
  • Ban bots and hackers who are trying to bruteforce your website or do anything suspicious.
@ankurk91
ankurk91 / mac-apps.md
Last active March 15, 2024 05:14
Mac OS 10.15 Apps and configs

macOS Apps

⚠️ No longer maintained! ⚠️

# Install x-code command line tools 
xcode-select --install

# Install homebrew iteself

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@yomybaby
yomybaby / TiUIWindowProxy.m
Last active August 3, 2016 18:23
iOS hidesBarsOnSwipe on Titanium
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#ifdef USE_TI_UIWINDOW
@oznu
oznu / README.md
Last active April 19, 2024 12:35
How to Bootcamp / Dual Boot Windows 10 on a mid-2011 iMac using USB

How to Install / Bootcamp Windows 10 on a mid-2011 iMac using USB

Apple has released support for bootcamping Windows 10, but only on 2012 Macs and later. Despite not being supported. it is possible to install Windows 10 on earlier iMacs and it seems to run quite well.

IMPORTANT: Unplug all external and physical hard drives (where possible) that you won't be installing to to avoid accidentally erasing them. Also make note of which drives and partitions remain (e.g. System and Storage hard drives), and be super careful to not erase the wrong one.

RECOVERY: If you nuke your machine, restore your time machine backup. Instructions here.

Requirements

@lastguest
lastguest / include_gist.php
Last active September 6, 2017 07:52
[Include a gist file with local caching] #PHP #gist
<?php
/**
* Include a gist file with local caching
*
*
* @example :
* // Include lastguest/profiler gist
* // https://gist.github.com/lastguest/4344954
*
@joshjensen
joshjensen / alloy.py
Last active November 30, 2016 18:25
Alloy Grid - Open Alloy controllers, views, and styles in Sublime Text grid layout.
# Version: 0.0.022
# Please note: This has only been tested on Sublime Text 3 Build 3065
# Installation:
# 1. Click "Download Gist"
# 2. Put alloy.py in: ~/Library/Application Support/Sublime Text 3/Packages/User/
# 3. Set your layout to Grid 4 - Go to view > layout > Grid: 4
# 4. Add to the bliss of working with Alloy...
@kopiro
kopiro / ti-aliases.sh
Last active August 29, 2015 14:00
Titanium CLI Aliases
# Titanium aliases
alias ti-is-dev="if [ -e devtiapp.xml ]; then cp tiapp.xml tiapp.xml.copy; rm tiapp.xml; ln -svf devtiapp.xml tiapp.xml; fi"
alias ti-is-prod="if [ -e prodtiapp.xml ]; then cp tiapp.xml tiapp.xml.copy; rm tiapp.xml; ln -svf prodtiapp.xml tiapp.xml; fi"
# iOS
alias ti-ios="ti-is-dev && ti build -p ios --sim-64bit -I 7.1"
alias ti-ios-device="ti-is-dev && ti build -p ios -T device -I 7.1 --device-id all"
alias ti-ios-test="ti-is-dev && ti clean && ti build -p ios -T dist-adhoc -I 7.1"
alias ti-ios-install="ideviceinstaller --install dist/*.ipa"
# Android
alias ti-android="ti-is-dev && ti build -p android"
@lastguest
lastguest / call_closure.php
Last active August 29, 2015 13:57
Javascript like scope heritage
<?php
function foobarbaz(){
// Extract environment object to local scope (not mandatory, you can access the parent scope via $this. Ex. $this->foo )
extract((array)$this);
var_dump($foo, $bar, $baz);
}
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)