Skip to content

Instantly share code, notes, and snippets.

View abdouoi's full-sized avatar

Abdou O. I. (aka g33k1ns1d3) abdouoi

View GitHub Profile
@abdouoi
abdouoi / CreateEmptyImage.swift
Created July 28, 2018 14:21 — forked from viccc/CreateEmptyImage.swift
Create an empty UIImage of a given size, optionally filled with a given color. Swift.
func imageWithPixelSize(size: CGSize, filledWithColor color: UIColor = UIColor.clearColor(), opaque: Bool = false) -> UIImage {
return imageWithSize(size, filledWithColor: color, scale: 1.0, opaque: opaque)
}
func imageWithSize(size: CGSize, filledWithColor color: UIColor = UIColor.clearColor(), scale: CGFloat = 0.0, opaque: Bool = false) -> UIImage {
let rect = CGRectMake(0, 0, size.width, size.height)
UIGraphicsBeginImageContextWithOptions(size, opaque, scale)
color.set()
UIRectFill(rect)
@abdouoi
abdouoi / example.puml
Created January 23, 2018 14:40 — forked from QuantumGhost/example.puml
A simple template for PlantUML to draw ER diagram. The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
@abdouoi
abdouoi / build.gradle
Created March 5, 2017 02:40 — forked from gabrielemariotti/build.gradle
Use signing.properties file which controls which keystore to use to sign the APK with gradle.
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}
@abdouoi
abdouoi / pageTSConfig.ts
Created February 27, 2017 18:05 — forked from jaguerra/pageTSConfig.ts
TYPO3 RTE htmlarea allow iframe, script and html5 data attributes
#
# Permitir iframe, embed, script en RTE
#
RTE.default.proc.allowTags := addToList(iframe,embed,script,object,param,a,ul,li,ol)
RTE.default.proc.allowTagsOutside := addToList(iframe,embed,script,object,param,a,ul,li,ol)
RTE.default.removeTagsAndContents := removeFromList(script,object,param,a,ul,li,ol)
RTE.default.proc.HTMLparser_db = 0
RTE.default.proc.entryHTMLparser_db = 0
RTE.default.proc.exitHTMLparser_db = 0
@abdouoi
abdouoi / .travis.yml
Created February 9, 2017 23:50 — forked from petrbel/.travis.yml
Travis-CI submodules
# Use https (public access) instead of git for git-submodules. This modifies only Travis-CI behavior!
# disable the default submodule logic
git:
submodules: false
# use sed to replace the SSH URL with the public URL, then init and update submodules
before_install:
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
@abdouoi
abdouoi / Aircrack Commands
Created December 18, 2016 20:21 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
@abdouoi
abdouoi / osx-software-update-urls.txt
Created January 26, 2016 23:26 — forked from geoff-nixon/osx-software-update-urls.txt
URLs of the index files used by the software update client on OS X
10.3 (Panther):
https://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger):
https://swscan.apple.com/content/catalogs/index.sucatalog
https://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard):
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
@abdouoi
abdouoi / install-mongodb.md
Last active August 29, 2015 14:27 — forked from adamgibbons/install-mongodb.md
Install MongoDB on Mac OS X 10.9

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

@abdouoi
abdouoi / android.xml
Last active August 29, 2015 14:23 — forked from bolot/android.xml
<templateSet group="android">
<template name="focvb" value="@Override&#10;public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {&#10; View view = inflater.inflate(R.layout.fragment_$END$, container, false);&#10; ButterKnife.inject(this, view);&#10; return view;&#10;}&#10;" description="Fragment onCreateView with ButterKnife" toReformat="true" toShortenFQNames="true">
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="false" />
<option name="JAVA_EXPRESSION" value="true" />
<option name="JAVA_DECLARATION" value="true" />
<option name="JAVA_COMMENT" value="false" />
<option name="JAVA_STRING" value="false" />
<option name="COMPLETION" value="false" />