Skip to content

Instantly share code, notes, and snippets.

View AmyrAhmady's full-sized avatar
:shipit:
shipit shipit

iAmir AmyrAhmady

:shipit:
shipit shipit
View GitHub Profile
#define FILTERSCRIPT
#include <a_samp>
#include <colandreas>
new pBall;
new
Float:InGameX = 0.7,
Float:InGameY = 0.525,
const readFile = require('../utils/readfile.js');
readFile('./input.txt', run);
function run(data) {
const numbers =
data.replace(/(?:\\[r]|[\r]+)+/g, '')
.split('\n')
.map(number => parseInt(number));
import React from 'react';
import {
Animated,
View,
FlatList,
Dimensions,
Alert,
Text,
StyleSheet,
} from 'react-native';
import re
regex = r"<script id=\"__NEXT_DATA__\" type=\"application\/json\">(.*?)<\/script>"
test_str = ("<!DOCTYPE html><html><head><title>Live Scores - Football - Sporting Life</title><meta charSet=\"utf-8\"/><link rel=\"canonical\" href=\"https://www.sportinglife.com/football/live\"/><meta name=\"viewport\" content=\"initial-scale=1.0, width=device-width\"/><script src=\"/scripts/AppMeasurement.js\"></script><script>window.__envConfig={\"FEATURE_PUSH_FAST_RESULTS\":\"on\",\"ADOBE_LAUNCH_SCRIPT_URL\":\"https://assets.adobedtm.com/ab88feb89f31/0939ff9bd026/launch-6d577b984887.min.js\",\"AMAZON_TAM_ENABLED\":\"true\",\"ATR_VIDEO_TIMESTAMP\":\"0\",\"CACHE_HOST\":\"redis.external\",\"COOKIE_DOMAIN\":\"sportinglife.com\",\"DUX_ENABLED\":\"true\",\"FEATURE_BUCKET_COOKIE_AGE\":\"31556926\",\"FEATURE_CANARY_CONFIG_URL\":\"https://test.spl.infinityworks.com/canary/features.json\",\"FLASHTALKING_ENABLED\":\"true\",\"GOOGLE_ANALYTICS_PROPERTY_ID\":\"UA-83524757-1\",\"GOOGLE_ANALYTICS_SAMPLING_RATE\":\"100\",\"GOOGLE
package main
import (
"database/sql"
"encoding/json"
//"fmt"
_ "github.com/go-sql-driver/mysql"
"io/ioutil"
"strconv"
)
let imageNumber = 1;
if (this.state.pic1 && this.state.pic1.uri) {
let obj = {
uri: this.state.pic1.uri,
type: this.state.pic1.type,
name: 'image.jpg',
};
formData.append('Pic' + imageNumber, obj);
@AmyrAhmady
AmyrAhmady / sarvenaz.php
Last active September 8, 2020 23:38
redirect wp default register page to custom made one
<?php
function wpse127636_register_url($link) {
return str_replace(site_url('wp-login.php?action=register', 'login'),site_url('ثبت-نام', 'login'),$link);
}
add_filter('register','wpse127636_register_url');
function wpse127636_fix_register_urls($url, $path, $orig_scheme) {
@AmyrAhmady
AmyrAhmady / build.gradle
Last active September 8, 2020 08:16
test
apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
local sampev = require 'lib.samp.events'
local raknet = require 'lib.samp.raknet'
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
end
function sampev.onSendVehicleSync(data)
--print('Hydra thrust angle: ' .. data.hydraThrustAngle[0] .. ', ' .. data.hydraThrustAngle[1])
let input = "aabbccdaaaabb";
let output = [];
for (let i = 0; i < input.length; i++) {
let current = input[i];
let charStream = current.toString();
let offset = 0;
if (input[i - 1] != input[i] && input[i + 1] != input[i]) {