Skip to content

Instantly share code, notes, and snippets.

@guillermo-menjivar
guillermo-menjivar / load.go
Last active Apr 15, 2020
load and search
View load.go
4+ basic_file_upload.go + !/b/zsh [running] X
~/lab/analysis $ cat basic_file_upload.go
View test.py
import datetime
import calendar
from collections import namedtuple
predicate_string_template = "dt between \'{from_datetime}\' and \'{to_datetime}\' and timestamp between {from_datetime_epoch} and
@guillermo-menjivar
guillermo-menjivar / nosuchuser.html
Created Jul 14, 2019 — forked from mubix/nosuchuser.html
No Such User - Spam Deterrent
View nosuchuser.html
<html>
<head>
<style>
* {
font-family:Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" class="email-wrapper" style="padding-top:32px;background-color:#ffffff;"><tbody>
@guillermo-menjivar
guillermo-menjivar / bash-colors.md
Created Jul 2, 2018 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.
View bash-colors.md

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
View vim-go
"vim-go
"auto import
let g:go_disable_autoinstall = 0
let g:go_fmt_command = "goimports"
let g:go_textobj_include_function_doc = 0
let g:go_addtags_transform = "camelcase"
let g:go_highlight_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
@guillermo-menjivar
guillermo-menjivar / postgres-cheatsheet.md
Created May 20, 2018 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
View more.java
import java.util.*;
public class TicTacToe {
public static void main(String[] args) {
int[][]board= new int [3][3];
int turn= 1;
while(full(board)== false && winner(board)==0)
{
printBoard(board);
View something.java
import java.util.*;
public class GTac {
public static String PlayerO = " O ";
public static String PlayerX = " X ";
public static String Blank = " ";
public static String Delineator = "-----------"; // 11 ( each entry has 3 spaces and there are 3 entries + 2 deviders = 11
public static String Devider = "|";
public static void main(String[] args){
View full.py
#!/usr/bin/env python
from sys import exit
import json
import datetime
import requests
from uuid import uuid4
import psycopg2
import manicthief
View main.py
125 if len(ips_to_update) > 0:
126
127 while len(uuids_to_update) > 0:
128 print 'updating', len(uuids_to_update[:1000])
129 update_records(analytic['id'], uuids_to_update[:1000])
130 del uuids_to_update[:1000]
You can’t perform that action at this time.