This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
// Add custom actions and keybindings to this array. | |
// To unbind a key combination from your defaults.json, set the command to "unbound". | |
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings | |
"actions": | |
[ | |
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. | |
// These two lines additionally bind them to Ctrl+C and Ctrl+V. | |
// To learn more about selection, visit https://aka.ms/terminal-selection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(readr) # para leer fechas en español | |
library(dplyr) # para usar mutate y pipes | |
# asumiendo un data.frame cualquiera con una columna "x2" con | |
# los nombres de los meses, sin día y sin año | |
df = data.frame( | |
x1 = c('1', '2', '3'), | |
x2 = c("ENERO", "DICIEMBRE", "AGOSTO") | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from ( | |
select * | |
from TABLE | |
order by SORT_COLUMN desc | |
) temp | |
where rownum <= N_ROWS | |
order by SORT_COLUMN asc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requierements | |
sudo apt install util-linux bash procps hostapd iproute2 iw haveged net-tools dnsmasq iptables | |
cd /opt && git clone https://github.com/oblique/create_ap | |
cd create_ap && sudo make install | |
# Get wireless adapter ID | |
iwconfig | |
# Create temporary WLAN (closing this process will remove WLAN) | |
sudo create_ap -n wlp0s20f3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int pot = A0; // potentiometer | |
const int led = D8; | |
int potValue = 0; | |
long timestamp; | |
void setup () { | |
Serial.begin(9600); | |
Serial.println("Initializing..."); | |
timestamp = millis(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create temp table user_info as | |
select A.*, B.sends_to_role | |
from users as A | |
left join role_plans as B on A.role_id = B.role_id | |
where 1 = 1 | |
and (A.id = '{user_id}' or A.sap_id = '{user_id}') | |
and A.doc_id = '{doc_id}' | |
and A.is_active = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
export PATH=~/.npm-global/bin:$PATH | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/oracle/instantclient_11_2 | |
export PATH=$LD_LIBRARY_PATH:$PATH | |
export TNS_ADMIN=/opt/oracle | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
export ANDROID_HOME="/usr/lib/android/sdk/" | |
export PATH="${PATH}:${ANDROID_HOME}tools/:${ANDROID_HOME}platform-tools/" | |
export PATH=/usr/local/cuda-10.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1${PATH:+:${PATH}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
root: true, | |
env: { | |
browser: true, | |
node: true, | |
commonjs: true, | |
es6: true, | |
}, | |
parserOptions: { | |
parser: "babel-eslint", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import digest library (default R-base library) | |
library(digest) | |
# get current date in UTC as ISO string and keep all chars up until minutes | |
# eg. 2019-10-14T17:40 | |
date <- strftime(as.POSIXlt(Sys.time(), tz = "UTC"), "%Y-%m-%dT%H:%M") | |
# get userId | |
userId <- "0000123" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DP1.name AS DatabaseRoleName, | |
isnull (DP2.name, 'No members') AS DatabaseUserName | |
FROM sys.database_role_members AS DRM | |
RIGHT OUTER JOIN sys.database_principals AS DP1 | |
ON DRM.role_principal_id = DP1.principal_id | |
LEFT OUTER JOIN sys.database_principals AS DP2 | |
ON DRM.member_principal_id = DP2.principal_id | |
WHERE DP1.type = 'R' | |
ORDER BY DP1.name; |
NewerOlder