Skip to content

Instantly share code, notes, and snippets.

View Soufien's full-sized avatar
Living

Soufien Soufien

Living
  • Paris
View GitHub Profile
@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;
@chanmix51
chanmix51 / app.nginx.conf
Created August 17, 2011 08:45
nginx vhost conf silex & symfony
server {
listen 80;
server_name server.mydomain.net
root /var/www/app/web;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;

DEFCON Quals 2016 Pwnable -- GladOS

The write-up is basically the exploit.

@palaniraja
palaniraja / build-index.html
Created June 28, 2011 13:47
Download build files
<!DOCTYPE html>
<html>
<head>
<title>My awesome app</title>
</head>
<body>
<h2>beta builds</h2>
<a href="itms-services://?action=download-manifest&amp;url=http://dl.dropbox.com/u/1001/manifest.plist">Awesome App v 0.0.16</a></body>
<h2>alpha builds</h2>
@joerx
joerx / genymotion.desktop
Created June 28, 2014 05:59
genymotion.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Genymotion
Comment=Alternative Android Emulator based on VirtualBox
Exec=/opt/genymotion/genymotion
Icon=/opt/genymotion/icons/icon.png
NoDisplay=false
Terminal=false
Type=Application
Categories=Application;Development;
@jonhyman
jonhyman / BSONIdGenerator.h
Last active April 17, 2018 18:32
BSON Object Id generator in Objective-C
/*
# Copyright 2018 Jon Hyman
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@palaniraja
palaniraja / manifest.plist
Created June 28, 2011 13:46
App Manifest file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
@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.

@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}