Skip to content

Instantly share code, notes, and snippets.

View ricardo-dlc's full-sized avatar
:shipit:
Working

Ricardo de la Cruz ricardo-dlc

:shipit:
Working
  • Cancún, México
  • 09:30 (UTC -05:00)
View GitHub Profile
@mrizwan47
mrizwan47 / pandas_df_to_csv_in_chunks.py
Created January 26, 2023 11:30
Save Pandas dataframe to csv in chunks
import pandas as pd
df = pd.read_csv('large_file.csv')
n = 49000 # Max number of rows you want each chunk to have
chunks = [df[i:i+n].copy() for i in range(0,df.shape[0],n)]
k = 1
for chunk in chunks:
chunk.to_csv('data/chunk_{}.csv'.format(k), index=False)
@bradtraversy
bradtraversy / tailwind-webpack-setup.md
Last active November 17, 2024 13:20
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.

@font-face {
font-family: "Fira Code Nerd Font";
font-style: normal;
font-weight: 200;
src: url('https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/FiraCode/Light/complete/Fura%20Code%20Light%20Nerd%20Font%20Complete.ttf') format('truetype');
font-variant-ligatures: none;
}
@font-face {
font-family: "Fira Code Nerd Font";
font-style: normal;
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active November 19, 2024 05:25
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@jiggneshhgohel
jiggneshhgohel / ssh_config.md
Last active September 8, 2022 00:28
Windows 10 Linux Subsystem SSH-agent issues
Host github.com-jiggneshhgohel
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_work_gmail
AddKeysToAgent yes


Host csexperimental.abc.com
@bsara
bsara / git-ssh-auth-win-setup.md
Last active November 18, 2024 07:42
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/uname/) called .ssh.
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
  • .ssh/config
@parmentf
parmentf / GitCommitEmoji.md
Last active November 17, 2024 19:13
Git Commit message Emoji
@truemagic-coder
truemagic-coder / hubflow_workflow
Last active October 6, 2023 15:00
Hubflow Workflow
Git Hubflow Workflow:
Sync Branch:
git hf update - this will update master and develop and sync remote branches with local ones (be sure not to put commits into develop or master as it will push these up)
git hf push - this will push your commits in your local branch to the matching remote branch
git hf pull - this will pull the remote commits into your local branch (don't use if the remote branch has been rebased - use git pull origin "your-branch" instead)
Feature Branch:
gif hf feature start "my-feature" - this will create a feature branch on origin and local will be based off the latest develop branch (make sure to git hf update before or you will get an error if local develop and remote develop have divereged)
git hf feature finish "my-feature" - this will delete the local and remote branches (only do this after a PR has been merged)
@pklaus
pklaus / ddnsserver.py
Last active October 30, 2024 03:53 — forked from andreif/Simple DNS server (UDP and TCP) in Python using dnslib.py
Simple DNS server (UDP and TCP) in Python using dnslib.py
#!/usr/bin/env python
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import argparse
import datetime
import sys
import time
import threading
@kjunggithub
kjunggithub / gist:8330157
Last active July 18, 2024 02:34
git hubflow cheaetsheet

Git HubFlow Cheat Sheet

Preparing the repository

Create the repository on GitHub/Bitbucket. Once created, clone the created repository to your local machine using:

git clone [email protected]:username/repository.git

CD into the repository folder and run the init command to enable to hub flow tools:

cd repo_name