Skip to content

Instantly share code, notes, and snippets.

View zergioz's full-sized avatar
:octocat:
Back to the office. XD

Sergio Rodriguez - *nix zergioz

:octocat:
Back to the office. XD
View GitHub Profile
public async Task<ActionResult> Create(CampaignAssessment campaignAssessments)
{
_dbContext.CampaignAssessments.Add(campaignAssessments);
var assess = new OkObjectResult(campaignAssessments);
var saveChangesResult = await _dbContext.SaveChangesAsync();
if (saveChangesResult > 0)
{
return assess;
}
@zergioz
zergioz / exercise_2_archive.ipynb
Last active June 11, 2021 17:38
Exercise_2_archive.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zergioz
zergioz / exercise_4.ipynb
Created June 11, 2021 17:30
Exercise_4.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zergioz
zergioz / exercise_3.ipynb
Created June 11, 2021 17:30
Exercise_3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zergioz
zergioz / copy-of-exercise_1.ipynb
Created June 11, 2021 17:27
Copy of Exercise_1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zergioz
zergioz / saveInput.vb
Last active March 16, 2021 05:31
excelSaveInput.vb
Sub saveInput()
' tabbed sheet name
ws_output = "dataSheet"
' define initial row
next_row = Sheets(ws_output).Range("A" & Rows.Count).End(xlUp).Offset(1).Row
' find row names
Sheets(ws_output).Cells(next_row, 1).Value = Range("campField").Value
Sheets(ws_output).Cells(next_row, 2).Value = Range("loeField").Value
Sheets(ws_output).Cells(next_row, 3).Value = Range("objField").Value
-- MYSSQL CONSULTANT --
key_buffer = 1024M
max_allowed_packet = 16M
thread_stack = 256K
thread_cache_size = 128
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
max_connections = 200
@zergioz
zergioz / sftpParamiko.py
Created February 10, 2021 22:26
SSH Login python script
#!/usr/bin/env python
# load libs
import paramiko
import base64
import getpass
import os
import socket
import sys
import traceback
@zergioz
zergioz / Fibo.py
Created February 10, 2021 22:21
fibonacci sequence
#!/usr/bin/python
import sys
def main():
print ("Crash")
n = int(sys.stdin.readline())
fibonacci(n)
def fibonacci(n):
@zergioz
zergioz / clickScreen.py
Last active February 2, 2021 22:52
Click Screen with Python and Cron - Linux
# import library
import pyautogui
import time
# get size of screen
pyautogui.size()
# get mouse location
pyautogui.position()