Skip to content

Instantly share code, notes, and snippets.

View anhnt's full-sized avatar
🏠
Working from home

Anh anhnt

🏠
Working from home
View GitHub Profile
@jsynowiec
jsynowiec / GitHub Dark.icls
Last active September 19, 2023 00:37
GitHub (Primer) Visual Studio Code syntax color schemes for JetBrains IDEs like IntelliJ, PyCharm, WebStorm, PhpStorm, GoLand, CLion, RubyMine or AppCode
<scheme name="GitHub Dark" version="142" parent_scheme="Darcula">
<metaInfo>
<property name="created">2020-07-20T12:05:56</property>
<property name="ide">Python</property>
<property name="ideVersion">2020.1.3.0.0</property>
<property name="modified">2020-07-20T12:05:58</property>
<property name="originalScheme">Github Dark</property>
</metaInfo>
<colors>
<option name="CARET_COLOR" value="c8e1ff" />
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active May 1, 2024 21:12
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@cc32d9
cc32d9 / nodeos_full_node_setup.txt
Last active August 2, 2023 13:21
nodeos installation with ZFS
apt-get update && apt-get install -y aptitude git lxc-utils zfsutils-linux netfilter-persistent sysstat
# find the partition ID that is linked to the storage serial number.
# This will prevent from losing the partition if disk mapping changes
ls -l /dev/disk/by-id/ | grep sda6
zpool create -f zdata /dev/disk/by-id/wwn-0x600507604092b628236df4851535cef5-part6
## Fixate internal IP address of the container
systemctl stop lxc-net
sed -i -e 's,^.*LXC_DHCP_CONFILE,LXC_DHCP_CONFILE,' /etc/default/lxc-net
@ffeu
ffeu / main.dart
Created August 3, 2018 00:18
Flutter Main Example with StreamBuilder
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
@ducdhm
ducdhm / Get next birthday in MVEL
Last active August 31, 2017 05:30
Creating example data in Kademi
birthYear = formatter.getYear(profile.birthDate); currentYear = formatter.getYear(formatter.now); age = currentYear - birthYear; nextBirthDay = formatter.addYears(profile.birthDate, age); return nextBirthDay;
@nmcc
nmcc / CONSOLAS.md
Last active April 7, 2024 12:50
Install Consolas font on Mac

Download and install the font

  1. Download the Consolas font from http://www.fontpalace.com/font-details/Consolas/
  2. Open Finder and navigate to Downloads directory
  3. Double click the Consolas.ttf file
  4. A dialog box appears displaying the details about the font
  5. Click Install font button

Using Consolas font on IntelliJ IDEA:

  1. Open IDEA Preferences Window (Press Command + ,)
  2. Editor > Colors & Fonts > Font
@Ema4rl
Ema4rl / ssbg-slideshow.js
Last active January 18, 2020 18:43 — forked from ki11ua/Super simple background image slideshow.css
Super Simple jQuery Background-image Slideshow (using CSS3 for the transition, gets the image paths via HTML5 `data` attribute, and with image preload trick).
/*!
* By Eharry.me (https://gist.github.com/Ema4rl/b8ef90be99205ddada5ef2cd6e632ebe)
*/
! function ($) {
"use strict";
var slide = $("[data-slides]"),
count = 0,
slides = slide.data("slides"),
len = slides.length,
n = function () {
@Tristor
Tristor / server.conf
Last active September 14, 2018 06:16
OpenVPN server.conf
# Basic Connection Config
dev tun
proto udp
port 1194
keepalive 10 120
max-clients 5
# Certs
ca ca.crt
cert server.crt
@mojaray2k
mojaray2k / instafeedjsaccess.md
Last active May 22, 2022 10:40
Getting Instagram Access Token for http://intafeedjs.com

#Use this URL to get your client authorized for Instafeed.JS plugin for Instagram.

  1. First login into your Instargam account
  2. Then go to https://www.instagram.com/developer/
  3. At the top click on the Button that says "Manage Clients".
  4. If you have not Register a new client.
  5. Fill out everything and where it says redirect url put this url: http://instafeedjs.com
  6. Then on the security tab make sure you uncheck "Disable implicit OAuth"
  7. Finally use this link to authoruize Instafeed. Where it says "[Client ID]" replace that including the brackets with your clientID from instagram:
  8. https://instagram.com/oauth/authorize/?client_id=[Client ID]&redirect_uri=http://instafeedjs.com&amp;response_type=token
@fahimbabarpatel
fahimbabarpatel / Mongodb restore and dump commands via json, bson and csv.md
Last active June 1, 2023 10:11
Mongodb restore and dump commands via json, bson and csv

NOTE -

  • Remove -h option if you are doing operation on same machine
  • Remove -u , -p option if your database don't have username and password

Binary

Import database

mongorestore -h IP:port -d DB_Name -u user_name -p password <input db directory>