This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 <certificate_key.jks>" | |
exit 1 | |
fi | |
function loginfo { | |
GREEN="\033[92m" | |
CLEAR="\033[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { View, StyleSheet, AsyncStorage } from 'react-native' | |
import MapView from 'react-native-maps' | |
const DEFAULT_REGION = { | |
latitude: 32.068185, | |
longitude: 34.778051, | |
latitudeDelta: 0.045, | |
longitudeDelta: 0.045, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as cloudinary from 'cloudinary-core'; | |
class CloudinaryManager { | |
static get shared() { | |
if (this.instance == null || this.instance == undefined) { | |
this.instance = cloudinary.Cloudinary.new(); | |
this.instance.config('cloud_name', 'mycloudname'); | |
} | |
return this.instance; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum HomeStatus: Int { | |
case pending = 1 | |
case active = 2 | |
case inactive = 3 | |
case deleted = 4 | |
var title: String { | |
switch self { | |
case .pending: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk ' | |
BEGIN { | |
buffer="" | |
} | |
{ | |
gsub(/<\/*trk>/,"",$0) | |
gsub(/<\/*trkseg>/,"",$0) | |
gsub(/<trkpt/,"<wpt", $0) | |
gsub(/<\/trkpt>/,"<\/wpt>", $0) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
relnotes() { | |
local from_ref=$1 | |
if [ "$#" -eq 2 ]; then | |
local to_ref=$2 | |
elif [ "$#" -eq 1 ]; then | |
local to_ref="HEAD" | |
else | |
echo "Usage: relnotes <from-ref> [<to-ref>]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -e '"My wonderfull string 123123" =~ m/\d+/; print "$& \n"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a MAP button in place of the cell's accessoryView | |
UIImage *image = [UIImage imageNamed:@"checkin-fb-place.png"]; | |
UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; | |
UIButton *mapButton = [[UIButton alloc] initWithFrame:imageView.frame]; | |
[mapButton setImage:image | |
forState:UIControlStateNormal ]; | |
[mapButton addTarget:self action:@selector(mapAction:) | |
forControlEvents:UIControlEventTouchDown]; | |
cell.accessoryView = mapButton; | |
[imageView release]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mount -t cifs //ntserver/download -o username=vivek,password=myPassword /mnt/ntserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -iname *something* | xargs -I {} mv {} |