Skip to content

Instantly share code, notes, and snippets.

View tcdevs's full-sized avatar

TC Devs tcdevs

  • Technische Centrale
View GitHub Profile
@tcdevs
tcdevs / angularjs-providers-explained.md
Created December 8, 2016 09:20 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@tcdevs
tcdevs / Bootstrap: no blue glow
Created October 26, 2016 11:44 — forked from juliuscsurgo/Bootstrap: no blue glow
Twitter Bootstrap: remove the blue glow in the form inputs
input[type="text"], textarea {
outline: none;
box-shadow:none !important;
border:1px solid #ccc !important;
}
@tcdevs
tcdevs / angular-jqlite.adoc
Created October 24, 2016 13:01 — forked from esfand/angular-jqlite.adoc
Angular jqLite

Angular jqLite

jQuery and Angular

Angular doesn’t depend on jQuery. In fact, the Angular source contains an embedded lightweight alternative: jqLite. Still, when Angular detects the presence of a jQuery version in your page, it uses that full jQuery implementation in lieu of jqLite. One direct way in which this manifests itself is with Angular’s element abstraction. For example, in a directive you get access to the element that the directive applies to:

@tcdevs
tcdevs / wpcf7_add_action.html
Last active October 10, 2016 13:06
Replace form fields by name with uppercase characters - WP Contactform 7
<?PHP add_action( 'wpcf7_before_send_mail', 'wpcf7_add_text_to_mail_body' );
function wpcf7_add_text_to_mail_body($contact_form){
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
// Get POST data
$posted_data = $submission->get_posted_data();
@tcdevs
tcdevs / ngEnter.js
Created August 31, 2016 06:08 — forked from EpokK/ngEnter.js
ngEnter directive if you can use submit form(https://twitter.com/ririlepanda)
app.directive('ngEnter', function() {
return function(scope, element, attrs) {
element.bind("keydown keypress", function(event) {
if(event.which === 13) {
scope.$apply(function(){
scope.$eval(attrs.ngEnter);
});
event.preventDefault();
}
@tcdevs
tcdevs / index.html
Last active July 19, 2016 10:09
Boostrap 3 no padding for the 'container-fluid'
<div class="container-fuid">
<div class="row">
<div class="col-lg-12 no-col-padding"></div>
content
</div>
</div>
@tcdevs
tcdevs / gist:b31f982bd48945c619b36a8d24993ce1
Created July 12, 2016 13:30 — forked from chad3814/gist:2924672
deleting array items in javascript with forEach() and splice()
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561
/*
* How to delete items from an Array in JavaScript, an exhaustive guide
*/
// DON'T use the delete operator, it leaves a hole in the array:
var arr = [4, 5, 6];
delete arr[1]; // arr now: [4, undefined, 6]
Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1
$domain = "mydomain.com"
$certificiatePassword = "abcd1234"
$email = "[email protected]"
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid()
mkdir $vault
cd $vault
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/
New-ACMERegistration -Contacts mailto:$email
@tcdevs
tcdevs / deployTools.md
Created April 13, 2016 08:17
Node deploy tools
@tcdevs
tcdevs / cobrowse.md
Last active April 13, 2016 08:07
Cobrowse