Skip to content

Instantly share code, notes, and snippets.

Everything not saved will be lost

Alif h4ck4life

Everything not saved will be lost
Block or report user

Report or block h4ck4life

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
h4ck4life /
Created Jun 26, 2019 — forked from ramirovjr/
Install all the necessary tools for a developer machine on Ubuntu 14.04
# All the configuration settings described below were found on the internet,
# and this script just automates it
# Generating locales
sudo locale-gen en_US en_US.UTF-8 pt_BR pt_BR.UTF-8 es_ES es_ES.UTF-8
# Installing base packages
sudo apt-get update
View Adding Images to markdown files in Gist.markdown

How To - Upload and add Images to markdown files in Gist

Markdown files allow embedding images in it. However it requires the image to be hosted at some location and we can add the url of the image to embed it.

Example: ![Alternate image text](https://someurl/imagelocation/image.png)

We can use services like imgur or other services to host the images and use the hosted URL.

h4ck4life / main.dart
Created Dec 10, 2018 — forked from StrykerKKD/main.dart
Web scraping with Dart 2
View main.dart
import 'dart:async';
import 'package:http/http.dart' as http;
import 'package:html/parser.dart' as parser;
import 'package:html/dom.dart';
main() async {
http.Response response = await http.get('');
Document document = parser.parse(response.body);
h4ck4life / gist:aa27b0e897091f8aeec745661ac1753d
Created Aug 15, 2018 — forked from thomasgriffin/gist:4733283
Map subdomains to URLs in nginx with WordPress.
View gist:aa27b0e897091f8aeec745661ac1753d
server {
listen 80;
listen 443 ssl;
server_name ~^(?<user>[a-zA-Z0-9-]+)\.example\.com$;
location / {
rewrite ^([^.]*[^/])$ $1/ permanent;
proxy_pass_header Set-Cookie;
proxy_pass $scheme://$user$request_uri;
h4ck4life / settings.json
Created Aug 8, 2018 — forked from JohannesHoppe/settings.json
VSCode: proxy settings
View settings.json
// VSCode: Place your settings in this file to overwrite the default settings
"http.proxy": "",
"https.proxy": "",
"http.proxyStrictSSL": false

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

What's an Effective Engineer?

h4ck4life /
Created Jun 28, 2018 — forked from korakot/
Google colab file upload/download
View'example.txt') # from colab to browser download
h4ck4life / build.gradle
Created Jun 20, 2018 — forked from gpeal/build.gradle
Airbnb Gradle Flavors
View build.gradle
apply from: './flavors.gradle'
android {
buildTypes {
productFlavors {
project.flavors.each { flavor, config ->
"$flavor" {
dimension 'scope'
if (flavor != 'full') {
h4ck4life /
Created Jun 11, 2018
Rounding to the nearest 5 cents
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.Arrays;
public class RoundDemo {
public static void main(String[] args) {
for (int n : Arrays.asList(
h4ck4life /
Created Jun 9, 2018
grep cheat sheet
# print lines begining with range of letters
grep ^[A-D] table.txt
You can’t perform that action at this time.