Skip to content

Instantly share code, notes, and snippets.

gmocamilotd / 0_reuse_code.js
Last active April 26, 2018 16:05
markdown tips usar markdown Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
gmocamilotd / sss
Last active August 2, 2018 17:53
(errorfix) syscall
View sss
# los errores de:
* dirscan
* noauthorize
en windows 10, se arrgelan asegurnadose de usar npm 5.3.0
otro manera es dando acceso comple to(full) a todas las cuentas que tenga el sistema
respecto de la carpeta en cuestion
gmocamilotd / tt
Last active September 28, 2017 03:22
angular, errorfix
View tt
## Can't bind to 'ngModel' since it isn't a known property of 'input'
### resuelve
Yes that's it, in the app.module.ts, I just added :
import { FormsModule } from '@angular/forms';
gmocamilotd / jj
Last active September 20, 2017 22:14
View jj
If you need access to a function from several places, consider putting it in a service as mentioned before
el ejemplo completo:
gmocamilotd / md1
Last active October 4, 2017 03:28
View md1
1. take a look at [Chrome Devtools]( (given you use Chrome which has very neat devtools build-in).
2. I also often suggest people to do the [free Code School course]( on Discover Devtools which is nice as well.
3. Open web developer console, go to "Sources" section. Press "CTRL+P". A search box will open where type ".ts" and find your file or directly search your file like "myfile.ts". Open it and you can put breakpoints directly in the code, the same way we put breakpoints in a js file and Voila, you can debug Typescript.
4. In the case of TypeScript, also make sure that you enable sourcemaps. As you probably know TypeScript isn't directly executed by the browser, but rather it is being "compiled" (or as it's called "transpiled") into JavaScript. That said, you probably don't wanna debug the transpiled JS but rather the TypeScript code you wrote. To enable sourcemaps, set the proper flag in your __tsconfig.json__:
gmocamilotd / as
Last active October 29, 2017 04:53
View as
Font Awesome CDN is the easiest way to get Font Awesome on your website or app,
all with just a single line of code. No downloading or installing!
## Download & Customize
Want to manage and host Font Awesome assets yourself? You can download, customize,
and use the icons and default styling manually.
Both CSS and CSS Preprocessor (Sass and Less) formats are included.
gmocamilotd / in data base
Last active December 4, 2017 04:54
Ideally there would be a way for Postgres to handle both of these concerns: generate the string ensure its uniqueness source:
View in data base
new_uid text;
done bool;
done := false;
new_uid := md5(''||now()::text||random()::text);
done := NOT exists(SELECT 1 FROM my_table WHERE uid=new_uid);
View noname
### [Returning Command](
### [How to return result of a SELECT inside a function in PostgreSQL?](
### [varibles del entorno](
### [PostgreSQL SQL Tricks](
### [System Information Functions](
gmocamilotd / css
Last active December 7, 2017 13:29
#css asume claro que tiene un elemento cuyo ID es 'footer'
View css
#footer {
position: fixed;
bottom: 0;
width: 100%;
gmocamilotd / elcss
Last active December 19, 2017 00:55
View elcss
.left, .right {
float: none;
padding: 20px;
width: 50%;
vertical-align: top;
.container {
display: table;
width: 100%;