(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Install a package and also update package.json with the installed version and package name.
<?php | |
$fp = fsockopen("localhost", 80, $errno, $errstr, 30); | |
$vars = array( | |
'hello' => 'world' | |
); | |
$content = http_build_query($vars); | |
fwrite($fp, "POST http://localhost/teste/test.php HTTP/1.1\r\n"); | |
fwrite($fp, "Host: localhost \r\n"); |
/* | |
b = (function(){ | |
this.nome = 'a'; | |
}); | |
a = new b(); | |
console.log(a.nome); | |
*/ | |
/* | |
a = (function(){ |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Install a package and also update package.json with the installed version and package name.
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
<?php | |
// Put your device token here (without spaces): | |
$deviceToken = '7ea574515a5f669070e3b9459db24be3f4b8085d122ddb7fa16d8cf9063e019a'; | |
// Put your private key's passphrase here: | |
$passphrase = 'Figueiredo771'; | |
// Put your alert message here: | |
$message = 'My first push notification!'; |
var json = [ | |
{ | |
"id" : '1', | |
"name" : "Marker 1", | |
"lat" : '-25.55913', | |
"lng" : '-49.282099' | |
}, | |
{ | |
"id" : '2', |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://jashkenas.github.io/underscore/underscore-min.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
import * as AWS from 'aws-sdk' | |
AWS.config.update({ region: 'us-east-1' }); | |
var credentials = new AWS.SharedIniFileCredentials({ profile: 'default' }); | |
AWS.config.credentials = credentials; | |
const ec2 = new AWS.EC2(); | |
var params = {}; |
#!/bin/bash | |
# https://www.baeldung.com/linux/execute-command-directories | |
function recursive_for_loop { | |
for f in *; do | |
if [ -d $f -a ! -h $f ]; | |
then | |
cd -- "$f"; | |
echo "Doing something in folder `pwd`/$f"; |