Skip to content

Instantly share code, notes, and snippets.

View tekvyy's full-sized avatar
🏹
Focusing

Dev tekvyy

🏹
Focusing
View GitHub Profile
@tekvyy
tekvyy / Php upload file and Get link in json response
Created April 14, 2015 16:07
Php upload file and Get link in json response
@tekvyy
tekvyy / File to String java
Last active August 29, 2015 14:23
File to String java
File initialFile = new File(new java.io.File("").getAbsolutePath()+"/app/src/main/assets/ab.txt");
System.out.println("path : "+initialFile.getPath().toString());
try {
InputStream targetStream = new FileInputStream(initialFile);
InputStreamReader is = new InputStreamReader(targetStream);
StringBuilder sb=new StringBuilder();
BufferedReader br = new BufferedReader(is);
String read = br.readLine();
@tekvyy
tekvyy / showDialog android
Created June 28, 2015 05:44
show dialog android method
public void showDialog(){
final ProgressDialog dialog = ProgressDialog.show(EasterEggActivity.this, "Loading", "Loading. Please wait...", true);
Runnable progressRunnable = new Runnable() {
@Override
public void run() {
dialog.cancel();
}
@tekvyy
tekvyy / PHP email script
Last active June 3, 2018 13:53
PHP email script
<?php
//values from post request
$name=$_POST['name'];
$email=$_POST['email'];
$comment=$_POST['comment'];
//predefined values
$send_email_to = "sample@gmail.com";
$subject = "Post Request To Server";
@tekvyy
tekvyy / fibonacci.py
Created August 30, 2015 15:50
Fibonacci Series Python
temp = []
for num in range(0,10):
if(num<=1):
temp.append(num)
else:
temp.append(temp[num-1]+temp[num-2])
print(temp)
@tekvyy
tekvyy / simplejsonparse.php
Last active November 1, 2015 01:43
simplejsonparse.php
<?php
$inputJSON = file_get_contents('php://input');
$input= json_decode( $inputJSON, TRUE );
//echo json_encode($input);
//echo "Hello " , $input['name'] , ", " , "Your age is ", $input['age'];
$arr = array('status' => 'saved', 'data'=>"Name = ".$input['name'].", Age = ".$input['age']);
echo json_encode($arr);
@tekvyy
tekvyy / aggregate framework xcodeproj
Last active February 17, 2017 14:38
aggregate framework xcodeproj
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
xcodebuild -workspace "${PROJECT_NAME}.xcworkspace" -scheme "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -workspace "${PROJECT_NAME}.xcworkspace" -scheme "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
0xCa39A4E1B0B31dA18233cb205B48babB68b62e71