Skip to content

Instantly share code, notes, and snippets.

View Soufien's full-sized avatar
Living

Soufien Soufien

Living
  • Paris
View GitHub Profile
@codediodeio
codediodeio / database.rules.json
Last active January 28, 2024 19:07
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@DawidvanGraan
DawidvanGraan / BitbucketPipelines2Firebase.md
Last active February 25, 2020 22:50
Deploy your Angular 2 project with Bitbucket Pipelines to Firebase Hosting

Deploy your Angular 2 project with Bitbucket Pipelines to Firebase Hosting

Firebase

Please see the Firebase setup instruction to setup a project on Firebase.

Firebase CI Token

To run the firebase deploy command you need to obtain a login token from Firebase. To do so, run the firebase login:ci on your command line which will generate a token. Copy the generated token.

Environment Variables

Goto your project in Bitbucket, open the Settings and select Environment variables.

@mcnamee
mcnamee / bitbucket-pipelines.yml
Last active December 14, 2023 03:57
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add FTP_USERNAME, FTP_PASSWORD and FTP_HOST as environment variables.
# 2. Commit this file (bitbucket-pipelines.yml) to your repo (in the repo root dir)
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initialize GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (see 'Installation' above) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:deploy-all)

DEFCON Quals 2016 Pwnable -- GladOS

The write-up is basically the exploit.

#!/bin/sh
ADB_PATH="/Users/medyo/Library/Android/sdk/platform-tools"
PACKAGE_NAME="com.mobiacube.elbotola.debug"
DB_NAME="default.realm"
DESTINATION_PATH="/Users/Medyo/Desktop/"
NOT_PRESENT="List of devices attached"
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'`
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then
echo "Make sure a device is connected"
else
Project # of Top 100 Free Apps (US)
facebook-ios-sdk 67
Bolts-iOS 48
AFNetworking 39
Google-Mobile-Ads-SDK 38
Reachability (Apple) 38
Crashlytics 37
Flurry-iOS-SDK 31
CocoaPods 30
GoogleConversionTracking 29
@pololee
pololee / social-icon-hover.css
Created March 13, 2015 23:35
hover color for different social icons
/* Change the color of individual Social Icons */
a.icon-feed {color:#DC622C;} /* Change to desired color */
a.icon-twitter {color:#00B6F1;} /* Change to desired color */
a.icon-facebook {color:#3B5998;} /* Change to desired color */
a.icon-google {color:#C20806;} /* Change to desired color */
a.icon-instagram {color:#2C6A93;} /* Change to desired color */
a.icon-wordpress {color:#04769C;} /* Change to desired color */
a.icon-youtube {color:#C31A1E;} /* Change to desired color */
a.icon-pinterest {color:#C91517;} /* Change to desired color */
a.icon-github {color:#040204;} /* Change to desired color */
@michiel
michiel / eclipse.desktop
Created January 18, 2015 20:35
eclipse gnome3 desktop
# .local/share/applications/eclipse.desktop
[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=/opt/eclipse/icon.xpm
Exec=/opt/eclipse/eclipse
Terminal=false
Categories=Development;IDE;Java;
@alexruperez
alexruperez / UIImageTintCGExtension.swift
Last active March 2, 2021 13:54
UIImage tint with UIColor in Swift
extension UIImage
{
func tint(color: UIColor, blendMode: CGBlendMode) -> UIImage
{
let drawRect = CGRectMake(0.0, 0.0, size.width, size.height)
UIGraphicsBeginImageContextWithOptions(size, false, scale)
let context = UIGraphicsGetCurrentContext()
CGContextClipToMask(context, drawRect, CGImage)
color.setFill()
UIRectFill(drawRect)
@colingourlay
colingourlay / example.js
Last active October 22, 2021 15:16
Lodash / Underscore sort object keys. Like _.sortBy(), but on keys instead of values, returning an object, not an array. Defaults to alphanumeric sort.
var obj = {b: 3, c: 2, a: 1};
_.sortKeysBy(obj);
// {a: 1, b: 3, c: 2}
_.sortKeysBy(obj, function (value, key) {
return value;
});
// {a: 1, c: 2, b: 3}