Skip to content

Instantly share code, notes, and snippets.

View kevotovar's full-sized avatar
🐒
Working

Kevin Tovar kevotovar

🐒
Working
View GitHub Profile
@kevotovar
kevotovar / .gitconfig
Created July 2, 2021 15:44
.gitconfig
[alias]
co = checkout
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cob = checkout -b
cm = !git add -A && git commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
wip = !git add -u && git commit -m "WIP"
undo = reset HEAD~1 --mixed
amend = commit -a --amend

Keybase proof

I hereby claim:

  • I am kevotovar on github.
  • I am kevotovar (https://keybase.io/kevotovar) on keybase.
  • I have a public key ASB0UOKkVcHZY94o0Z1R_Q7apfmR36p6pGPGTxwiU6g_igo

To claim this, I am signing this object:

{
"singleQuote": true,
"semi": false,
"trailingComma": "es5"
}
import { HttpLink, ApolloClient, InMemoryCache } from "apollo-boost";
import { AsyncStorage } from "react-native";
import { setContext } from "apollo-link-context";
const httpLink = new HttpLink({ uri: "http://localhost:8000/graphql/" });
const authLink = setContext(async (req, { headers }) => {
const token = await AsyncStorage.getItem("authToken");
return {
...headers,
 $(document).ready(function() {
//funcion para iniciar campos de formularios
inicializarCampos = setInterval(function() {
if ($(".hs-form").length > 0) {
clearInterval(inicializarCampos);
$('input[name="trackid"]')
.val("utsnadlst")
.change();
//$('input[name="utm_source_custom"]').val(getUrlParameter('utm_source')).change();
from rest_framework.pagination import PageNumberPagination
class ClassRoomPagination(PageNumberPagination):
page_size = 12
page_size_query_param = 'page_size'
@kevotovar
kevotovar / objectToQueryParams.js
Created October 12, 2018 17:58
Convert object to django filter query params
function objectToQueryParams (obj) {
var params = '?';
var objectKeys = Object.keys(obj);
var objectLastItem = objectKeys.length - 1;
objectKeys.forEach(function(key, index) {
var currentValue = obj[key];
if (
typeof currentValue === 'object' &&
currentValue.length
) {
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!-- NAME: 1 COLUMN - FULL WIDTH -->
<!--[if gte mso 15]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>