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
var data = [ | |
{}, // blank so we can index by 1 (matching the IDs) | |
{id: 1, verb: 'Say', value: 'Thanks for calling. Press 1 to leave a voicemail or 2 Customer Service' | |
options: { | |
'1': 5, | |
'2': 6 | |
} | |
}, | |
{id: 2, verb: 'Gather', children: [1]}, | |
{id: 3, verb: 'Say', value: 'Please leave a voicemail'} |
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
$provide.decorator("$interpolate", function($delegate){ | |
var interpolateWrap = function(){ | |
var interpolationFn = $delegate.apply(this, arguments); | |
if(interpolationFn) { | |
return interpolationFnWrap(interpolationFn, arguments); | |
} | |
}; | |
var interpolationFnWrap = function(interpolationFn, interpolationArgs){ |
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
'MediaStream.stop()' is deprecated and will be removed in M47, around November 2015. Please use 'MediaStream.active' instead. |
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
@Slf4j | |
@SpringBootApplication(exclude={ AmqpBusAutoConfiguration.class }) | |
public class Server { | |
public static void main(String[] args) { | |
EnhancedSpringApplication.run(Server.class, args); | |
} | |
@Autowired(required = false) | |
private ConfigServicePropertySourceLocator locator; |
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
#!/bin/bash | |
for D in `find /proc -maxdepth 1 -type d` | |
do | |
PID=`echo $D | cut -d'/' -f3 ` | |
if [[ $PID =~ [0-9]+ ]]; then | |
C=`ps -up $PID | grep $PID | tr -s " " | cut -d " " -f 11-17` | |
COUNT=`sudo ls -l "$D"/fd | wc -l` | |
echo " ($PID) $COUNT => $C" | |
fi | |
done |
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
public class ExampleController { | |
@Inject | |
private StepRepo stepRepo; | |
@Inject | |
private StepChildRepo childRepo; | |
@RequestMapping(value = "/{stepId}/options/", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) | |
public @ResponseBody Object putOptions(@RequestBody OptionList beans, @PathVariable Long stepId){ |
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
{ | |
version:0, | |
id:26, | |
value:"bah", | |
name:"bahaha", | |
links:[ | |
{ | |
rel:"self", | |
href:"http://localhost:8078/api/twilio/steps/26{?projection}" | |
} |
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
@FeignClient(url = "${app.api.someService.baseUrl}") | |
public interface SomeFeign { | |
@RequestMapping(method = RequestMethod.POST, value = "/steps/", | |
produces = "application/json") | |
Step createStep(@RequestBody Step step); | |
@RequestMapping(method = RequestMethod.PUT, value = "/steps/{stepId}", | |
produces = "application/json") | |
Step updateStep(@RequestBody Step step, @PathVariable("stepId") Long stepId); | |
} |
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
@Slf4j | |
@Configuration | |
public class SpringDataRestConfig { | |
private static final String BASE_PACKAGE = "com.example.yourapp"; | |
@Inject | |
private RepositoryRestConfiguration restConfig; | |
@Inject |
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
var addRow = $('.add-row'), | |
submit = $('.submit'), | |
container = $('.question-container'), | |
tpl = $('.template').html() // get the HTML contents as a string | |
addRow.on('click', addOne); | |
submit.on('click', sendIt); | |
// *should* create a whole new element from the string and stuff it in at the bottom | |
function addOne(){ |