Skip to content

Instantly share code, notes, and snippets.

@sgur
sgur / neosnippet_completer.py
Created June 18, 2013 17:59
neosnippet_completer.py
#!/usr/bin/env python
#
# Copyright (C) 2013 Stanislav Golovanov <[email protected]>
# Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@sgur
sgur / general_completer_store.py
Created June 18, 2013 17:59
general_completer_store.py
#!/usr/bin/env python
#
# Copyright (C) 2013 Stanislav Golovanov <[email protected]>
# Strahinja Val Markovic <[email protected]>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@mitsuji
mitsuji / create_vm.sh
Created January 13, 2014 10:24
VirtualBox create vm shell script
#!/bin/sh
# ./create_vm.sh vm1 Debian_64 1024 20000 3393 Downloads/debian-7.1.0-amd64-netinst.iso
# VBoxManage startvm vm1 -type headless
# VBoxManage unregistervm vm1 --delete
VM_NAME=$1
OS_TYPE=$2
MEMORY_SIZE=$3
@bsweger
bsweger / useful_pandas_snippets.md
Last active November 13, 2024 19:55
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@erikvip
erikvip / cygwinlist.md
Last active August 17, 2024 06:52
Import/Export Cygwin List of installed packages

Import & Export Cygwin List of installed Packages

If you want to go from 32 to 64 bit Cygwin but keep all the packages[1], you might find yourself in a spot where you would like to export the list of cygwin packages and also be able to install cygwin with all these packages again. I will tell you how. Open your Cygwin shell and enter

cygcheck -c -d | sed -e "1,2d" -e 's/ .*\$//' > packagelist

This will simply dump a list of installed packages. To install Cygwin 64 with these packages selected, download setup-x86_64[2] and execute it with the command line parameters

./setup-x86_64 -P `awk 'NR==1{printf \$1}{printf ",%s", \$1}' packagelist`
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links
@0XDE57
0XDE57 / config.md
Last active November 18, 2024 12:20
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@equalsraf
equalsraf / NeovimCygwin.md
Last active June 22, 2024 09:35
Neovim in Cygwin

TLDR; no, libuv doesn't work in Cygwin just yet, see at the bottom.

Requirements

I tested using the master branch (9d3449852bd35c9283948186d0259c1bf73b8579 or later)

I installed the following in the cygwin setup

  • gcc-c++ make cmake pkg-config libtool
anonymous
anonymous / .Xdefaults
Created June 12, 2016 04:12
*background: #1f2033
*foreground: #d4cec2
*color0: #1f2033
*color1: #60475a
*color2: #474b69
*color3: #bcaea5
*color4: #585c78
*color5: #a89391
*color6: #94949f
*color7: #bcbfb9
@ph1ee
ph1ee / hidpi.sh
Created July 7, 2016 05:50
hidpi config for Ubuntu GNOME
#!/bin/sh
# https://wiki.archlinux.org/index.php/HiDPI#How_to_use_non-whole_numbers
gsettings set org.gnome.desktop.interface scaling-factor 2
xrandr --output eDP1 --auto --scale 1.5x1.5
xrandr --output eDP1 --panning 2880x1620