This file contains hidden or 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
| cd <localdir> | |
| git init | |
| git add . | |
| git commit -m 'message' | |
| git remote add origin <url> | |
| git push -u origin master |
This file contains hidden or 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
| <?php | |
| $args = array( | |
| 'post_type' => 'Custom_Blog', | |
| 'posts_per_page' => 6 | |
| ); | |
| $the_query=new WP_Query($args); | |
| while ( $the_query->have_posts() ) { | |
This file contains hidden or 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
| PrintWriter objOutStream = new PrintWriter(new BufferedWriter(new FileWriter("EmployeeData.txt"))); //create and wite on object data . get the hashEmployee// | |
| for (Map.Entry<String, Employee> entry : hashEmployeelist.entrySet()) { | |
| String key = entry.getKey(); | |
| Employee employeeobj = entry.getValue(); | |
| objOutStream.println(employeeobj.getSsNumber() + "," + employeeobj.getFirstName() + "," + employeeobj.getLastName() + "," + employeeobj.getDateOfBirth() + "," + employeeobj.getAddress() + "," + employeeobj.getPhone() + "," + employeeobj.getEmail() + "," + employeeobj.getJobTitle()); | |
| } | |
| objOutStream.close(); |
This file contains hidden or 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
| <?php | |
| $command = escapeshellcmd('python /users/rinjin/desktop/webscrap.py'); | |
| $output = shell_exec($command); | |
| echo $output; | |
| ?> |
This file contains hidden or 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 urllib | |
| import re | |
| urls=["http://google.com","http://nytimes.com","http://cnn.com","http://facebook.com","http://youtube.com"] | |
| regex='<title>(.+?)</title>' | |
| pattern= re.compile(regex) | |
| for x in urls: | |
| htmlfile =urllib.urlopen(x) |
This file contains hidden or 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
| ini_set( 'error_reporting', E_ALL ); | |
| ini_set( 'display_errors', true ); |
This file contains hidden or 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
| <?php | |
| if (!empty($_GET['location'])){ | |
| /** | |
| * Here we build the url we'll be using to access the google maps api | |
| */ | |
| $maps_url = 'https://'. | |
| 'maps.googleapis.com/'. | |
| 'maps/api/geocode/json'. | |
| '?address=' . urlencode($_GET['location']); | |
| $maps_json = file_get_contents($maps_url); |
This file contains hidden or 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
| <div class="col-md-5 col-xs-12"> | |
| <h2><em>Latest Troll Nepal</em></h2> | |
| <br/> | |
| <?php | |
| $listcontent=array(); | |
| $listthumbnail=array(); | |
| $count=0; | |
| $the_query=new WP_Query('post_type=TrollNepal'); | |
This file contains hidden or 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
| <?php | |
| function callInstagram($url) | |
| { | |
| $ch = curl_init(); | |
| curl_setopt_array($ch, array( | |
| CURLOPT_URL => $url, | |
| CURLOPT_RETURNTRANSFER => true, | |
| CURLOPT_SSL_VERIFYPEER => false, | |
| CURLOPT_SSL_VERIFYHOST => 2 | |
| )); |
This file contains hidden or 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
| In the terminal run fg | |
| Press Control-C (if on a mac) |
OlderNewer