Skip to content

Instantly share code, notes, and snippets.

@EmadAdly
EmadAdly / install-android-sdk-in-ubuntu.md
Last active May 17, 2024 03:23
install JDK and Android SDK on Linux Ubuntu

install openjdk

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
@aveao
aveao / bird1-bird-vultr.conf
Last active May 17, 2024 03:20
BIRD 1 and 2 configs for BGP stuffs (HE Tunnelbroker, Vultr etc)
router id [our IPv4];
protocol bgp vultr
{
local as [our ASN];
source address [our IPv4 from vultr];
import all;
export filter {
if net ~ [[the IPv4 block we want to announce]] then accept;
reject;
@cgonzalezdai
cgonzalezdai / como-subir-un-proyecto-local-a-github.md
Last active May 17, 2024 03:18
Como subir un proyecto local a github

Como subir un proyecto local a github.

desde la web de github

Creamos un nuevo repositorio en https://github.com. Le damos nombre, descripción, seleccionamos si va a ser un proyecto publico o privado si es el caso, y dejamos el check de crear README sin marcar. Le damos a crear repositorio y con esto ya tenemos el repositorio donde alojaremos nuestro proyecto.

desde la terminal del equipo donde esta el proyecto que queremos subir a github

Nos vamos a la carpeta del proyecto y ejecutamos estos comandos.

git init

git add .
@JohnCoates
JohnCoates / AutoHook.h
Created May 26, 2017 22:06
Simple Objective-C Method Hooking
@protocol AutoHook <NSObject>
@required
+ (NSArray <NSString *> *)targetClasses;
@end
@butaji
butaji / gist:1208599
Created September 10, 2011 18:17
Download all files from url with wget
wget -r -l1 -A.mp3 <url>
#http://techpatterns.com/forums/about894.html
@butaji
butaji / app-en.js
Created February 21, 2023 03:41
Top 5000 Spanish sentences audio generation
var lineReader = require('readline').createInterface({
input: require('fs').createReadStream('sample.txt')
});
var values = {}
var i = 0
var s = 1
lineReader.on('line', function (line) {
i++;
//
// ZeroInboxToolbar.m
// GMailinator
//
// Created by Vitaly Baum on 1/5/17.
// Copyright © 2017 nompute. All rights reserved.
//
#import "ZeroInboxToolbar.h"
#import "ZeroInboxMessageViewer.h"
@butaji
butaji / app.js
Last active May 17, 2024 03:15
Code sample for artice Practical Microservices: Integration Tests and Stub Services https://medium.com/@butaji/practical-microservices-integration-tests-and-stub-services-80749ce01050#.zdyycghvf
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.json());
app.post('/setup', (req, res) => {
const body = req.body;
@butaji
butaji / api.js
Last active May 17, 2024 03:15
API and Backend services part for Correlation Token example https://medium.com/@butaji/practical-microservices-correlation-tokens-75888baa5182
const getUserId = () => Math.floor((Math.random() * 1000000) + 1); //yeah, it should be real user id
const myLogger = (req, res, next) => {
const token = req.method + "_" + req.path + "_" + getUserId() + "_" + new Date().getTime();
console.log(token);
req["app_token"] = token;
next();
};
app.get('/products', (req, res) => {
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Поиск по узлу
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
function loadFormWithHash() {
$.get('<%= Url.Action("SearchForm","Person") %>?' + window.location.hash.slice(1),
function (data) {
$('#searchContainer').html(data);