Skip to content

Instantly share code, notes, and snippets.

@iqbalhasnan
iqbalhasnan / gist:ed92fa2450cab9c5b63d2402f3ff2c72
Created February 25, 2020 00:46
Spark Hive errors and solutions
1.
Error:
java.io.IOException: java.lang.IllegalArgumentException: bucketId out of range: -1
Solution:
set hive.fetch.task.conversion=none;
2.
Error:
java.io.IOException: [Error 30022]: Must use HiveInputFormat to read ACID tables
@HoldOffHunger
HoldOffHunger / bradvin.social.share.urls.txt
Last active May 14, 2024 17:23
Social Share URL's (Summary)
https://www.facebook.com/sharer.php?u={url}
https://www.facebook.com/dialog/share?app_id={app_id}&display={page_type}&href={url}&redirect_uri={redirect_url}
https://reddit.com/submit?url={url}&title={title}
https://twitter.com/intent/tweet?url={url}&text={title}&via={user_id}&hashtags={hash_tags}
https://www.linkedin.com/sharing/share-offsite/?url={url}
https://api.whatsapp.com/send?phone={phone_number}&text={title}%20{url}
https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={text}&tags={hash_tags}
http://pinterest.com/pin/create/button/?url={url}
https://www.blogger.com/blog-this.g?u={url}&n={title}&t={text}
https://www.evernote.com/clip.action?url={url}&title={title}
@Therises
Therises / fix_mic_lenovo320.md
Last active May 14, 2024 17:21
Fix microphone on Lenovo IdeaPad 320 on Ubuntu 18.04

In /usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf and /usr/share/pulseaudio/alsa-mixer/paths/analog-input-mic.conf:

  • Under [Element Internal Mic Boost] set volume to zero.
  • Under [Element Int Mic Boost] set volume to zero.
  • Under [Element Mic Boost] set volume to zero

Find your source name from the following command; mine is alsa_input.pci-0000_00_1f.3.analog-stereo

  $ pacmd list-sources | grep 'name:.*input'

Edit /etc/pulse/default.pa and add the following lines, where INPUT_NAME is name of the input source from above step:

@berkedel
berkedel / mount-hfsplus-in-raspberry-pi.md
Last active May 14, 2024 17:20
Mount HFS+ in Raspberry Pi

The first thing to do before we access HFS+ drive, ensure our board is running lastest software.

sudo apt update
sudo apt upgrade

Install all HFS packages we need.

sudo apt-get install hfsplus hfsutils hfsprogs gdisk
@trusktr
trusktr / image-grid.md
Last active May 14, 2024 17:19
Image grid in Markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm

Cheat Sheet para o teste de EW

Setup do projeto

Criar servidor express.js

Para criar um servidor express.js para servir de API:

npx express-generator --no-view nome-do-projeto
@xgqfrms
xgqfrms / LeetCode & Promise & cancelable.md
Created May 14, 2024 17:15
LeetCode & Promise & cancelable
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@kresnasatya
kresnasatya / command.sh
Last active May 14, 2024 17:13
Deploy Laravel with Deployer in Github Actions
# Create user deployer with root account
adduser deployer
# Append (-a) a secondary group (-G) "www-data" to user "deployer"
usermod -a -G www-data deployer
# See groups assigned to user "deployer"
groups deployer
# Add ACL permission in /var/www