Skip to content

Instantly share code, notes, and snippets.

View jk2K's full-sized avatar
💭
I may be slow to respond.

jk2K jk2K

💭
I may be slow to respond.
View GitHub Profile
@jgibbard
jgibbard / pythonInstall.sh
Last active November 10, 2020 08:52
CentOS7 - Install Python 2.7 and 3.6 from source
#!/bin/bash
# Python 2.7 and 2.6 install script for CentOS 7
# Instructions mainly taken from tutorial by Daniel Eriksson
# https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/
python27_version=2.7.15
python36_version=3.6.6
build_dir=python_build_temp
example_environment_dir=pythonEnv

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@inkrement
inkrement / clickhousedump
Created August 19, 2017 14:26
dump all clickhouse databases and tables
#!/bin/bash
OUTDIR=.
while read -r db ; do
while read -r table ; do
if [ "$db" == "system" ]; then
echo "skip system db"
continue 2;
@mageddo
mageddo / ListUtils.java
Created June 21, 2017 22:54
How to make pagination at List in java
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Reference: https://stackoverflow.com/questions/19688235/how-to-implement-pagination-on-a-list
* @author elvis
* @version $Revision: $<br/>
* $Id: $
@folt
folt / gist:a98e9368dbe1dcbfce7198c16b862c92
Last active February 27, 2025 16:33
Balsamiq Mockups 3 crack
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active March 14, 2025 05:30
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@harv
harv / glibc-2.17_centos6.sh
Last active February 4, 2025 14:53
update glibc to 2.17 for CentOS 6
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \
@ibrahimlawal
ibrahimlawal / LC_CTYPE.txt
Created February 27, 2017 07:02 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@mcastelino
mcastelino / iptables-cheatsheet.md
Last active April 3, 2025 18:14
iptables-cheatsheet

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal
@arxdsilva
arxdsilva / working_directory.go
Last active January 6, 2025 19:29
How to get the current working directory in golang
package main
// More info on Getwd()
// https://golang.org/src/os/getwd.go
//
import(
"os"
"fmt"
"log"
)