Skip to content

Instantly share code, notes, and snippets.

@guschnwg
guschnwg / tamper.js
Last active February 24, 2023 15:03
Select last selected DB in redash
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://redash.internal.adroll.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=adroll.com
// @grant none
// ==/UserScript==
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 31 columns, instead of 6. in line 2.
id,title,ios_url,ios_app_store_id,ios_app_name,android_url,android_package,android_app_name,windows_phone_url,windows_phone_app_id,windows_phone_app_name,description,google_product_category,product_type,link,image_link,condition,availability,price,sale_price,sale_price_effective_date,gtin,brand,mpn,item_group_id,gender,age_group,color,size,shipping,custom_label_0
DB_1_,Dog Bowl In Blue,example-ios://electronic/db_1,123,Electronic Example iOS,example-android://electronic/db_1,com.electronic.example,Electronic Example Android,example-windows://electronic/db_1,64ec0d1b-5b3b-4c77-a86b-5e12d465edc0,Electronic Example Windows,Solid plastic Dog Bowl in marine blue color,Animals > Pet Supplies,Bowls & Dining > Food & Water Bowls,http://www.example.com/bowls/db-1.html,https://www.facebook.com/images/product_image_template.png?id=1,new,in stock,9.99 GBP,,,,Example,,DB_GROUP_1,,,,,UK::Standard:9.95 GBP,"Made in Waterford, IE"
DB_2_,Dog Bowl In Yellow,example-ios://electronic/db_2,123,Electronic Example iOS,example-andro
import React from 'react'
import {StyleSheet, TouchableOpacity} from 'react-native'
import {useSafeArea} from 'react-native-safe-area-context'
import Icon from 'react-native-vector-icons/FontAwesome'
import {WIDTH} from '../../config/constants'
import Items from './Items'
const Menu: React.FC<Props> = ({open = false, setOpen}) => {
from sqlalchemy.dialects import postgresql
utils.logger.debug(query.statement.compile(dialect=postgresql.dialect(), compile_kwargs={"literal_binds": True}))
@guschnwg
guschnwg / React.code-snippets
Last active January 13, 2020 11:14
My snippets for React in VS Code
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
@guschnwg
guschnwg / Emmet
Created January 8, 2020 12:09
My emmet cheat sheet with common uses
Emmet cheat sheet
option[value=$]{Tipo $}*3
```
<option value="1">Tipo 1</option>
<option value="2">Tipo 2</option>
<option value="3">Tipo 3</option>
<option value="4">Tipo 4</option>
```
import React, { useState, useEffect } from 'react'
const TypedOne = <T extends {}>(props: T): React.ReactElement => (
<span>
{JSON.stringify(props)}
</span>
)
function TypedTwo<T extends {}>(props: T) {
return (
{
"editor.fontWeight": "600",
"editor.minimap.enabled": false,
"files.insertFinalNewline": true,
"workbench.startupEditor": "none",
"workbench.useExperimentalGridLayout": true,
"workbench.sideBar.location": "right",
"workbench.tips.enabled": false,
"workbench.list.horizontalScrolling": true,
"breadcrumbs.enabled": true,
@guschnwg
guschnwg / utfprweb.txt
Created November 27, 2018 21:30
This is used to login into UTFPR's UTFPRWEB network using nmcli
UTFPRWEB Network
nmcli connection add type wifi con-name 'UTFPRWEB' ifname wlp3s0 ssid 'UTFPRWEB' wifi-sec.key-mgmt wpa-eap 802-1x.eap ttls 802-1x.phase2-auth mschapv2 802-1x.identity 'a1611925' 802-1x.identity 'a1611925'
nmcli connection up UTFPRWEB --ask
@guschnwg
guschnwg / create-hotspot.md
Last active October 25, 2018 12:50 — forked from narate/create-hotspot.md
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlp2s0 con-name gustavo-eadbox autoconnect yes ssid gustavo-eadbox
nmcli con modify gustavo-eadbox 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify gustavo-eadbox wifi-sec.key-mgmt wpa-psk
nmcli con modify gustavo-eadbox wifi-sec.psk "gustavo-eadbox"