Skip to content

Instantly share code, notes, and snippets.

View otanim's full-sized avatar
👁️

Arman Yeghiazaryan otanim

👁️
View GitHub Profile
#CXRLE Pos=-7289,-1110
x = 10016, y = 6796, rule = B3/S23
5843b2o$5843b2o4$5861bobo$5856bo4bo2bo$5857b2o5b2o8bo$5852b2o8bo3b2o5b
obo$5852b2o10b2o6bob2o$5841b2obob2o13bo2bo6b2ob2o$5861bobo8bob2o$5841b
o5bo25bobo8b2o$5864bo9bo9bobo$5842b2ob2o16bo22bo$5844bo18b3o20b2o6$
5847bo17b2o$5841b3o4b2o15b2o$5840bo3bo2b2o2$5839bo5bo$5839b2o3b2o2$
5864b2o$5864bobo$5866bo$5866b2o$5839b2o$5840bo$5837b3o$5837bo7$5851bo$
5851b3o$5854bo14bobo$5853b2o6b2o7b2o5b2o$5860bobo7bo6bo$5861bo16b3o$
5880bo2$5848b2o$5848b2o6b2o29b2o$5856b2o28bo2bo$5887b2o$5865b2o20b2o$
5865b2o19b2o8b2o$5885b2obo6bobo$5850b2o33b2obo7bo$5849bobo35bo$5849bo
@shakalaca
shakalaca / ct_monitor
Last active October 3, 2020 18:53
Switch root on / off
#!/system/bin/sh
if [ -f /system/xbin/su_ ]; then
# grant permission for changing & executing files (copy from ota survival program)
/system/xbin/supolicy --live "allow init system_file file { write setattr relabelfrom rename }"
/system/xbin/supolicy --live "allow init install_recovery_exec file { setattr relabelfrom relabelto rename }"
/system/xbin/supolicy --live "allow init zygote_exec lnk_file { unlink } "
mount -o rw,remount /system
@mosampaio
mosampaio / README.md
Last active May 26, 2024 20:00
Simple Phone Verification with Twilio, Node.js, Mongoose, and jQuery Raw

Please make sure you have set the following environment variables:

(This URL should be accessible thru the web. You can use Ngrok to help you if you are testing locally.)

export TWIML_SERVER_URL=https://www.example.org/twiml/

(This information can be found in your Twilio dashboard)

export TWILIO_ACCOUNT_SID=your-account-sid
@icodeforlove
icodeforlove / Float32Array.concat.js
Last active March 7, 2022 23:09
Float32Array concatenation uses buffers
Float32Array.prototype.concat = function() {
var bytesPerIndex = 4,
buffers = Array.prototype.slice.call(arguments);
// add self
buffers.unshift(this);
buffers = buffers.map(function (item) {
if (item instanceof Float32Array) {
return item.buffer;
@arahmanali
arahmanali / mongoose-ref-model-service.js
Last active March 12, 2020 22:38
Mongoose nested query on Model by field by its referenced model.
/*
Find all companies that people with lastname "Robertson" have founded
*/
var mongoose = require('mongoose');
var PersonSchema = new mongoose.Schema {
firstname: String,
lastname: String
};
var Person = mongoose.model('Person', PersonSchema);
@gaearon
gaearon / index.js
Last active January 21, 2025 08:07
Breaking out of Redux paradigm to isolate apps
import React, { Component } from 'react'
import Subapp from './subapp/Root'
class BigApp extends Component {
render() {
return (
<div>
<Subapp />
<Subapp />
<Subapp />
@syafiqfaiz
syafiqfaiz / how-to-copy-aws-rds-to-local.md
Last active December 8, 2024 22:08
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
@uzysjung
uzysjung / ebFont.config
Last active February 19, 2025 15:32
add custom font to Amazon linux
container_commands:
01_download_nanum_font:
command: wget http://static.campaign.naver.com/0/hangeul/renew/download/NanumFont_TTF.zip
02_unzip_font:
command: unzip Nanum*.zip
03_creat_fontdir:
command: mkdir -p /usr/share/fonts/nanumfont
04_mv_font:
command: mv *.ttf /usr/share/fonts/nanumfont
05_add_font_cache:
@tmarshall
tmarshall / aws-sns-example.js
Last active October 30, 2022 06:12
aws-sdk sns example, in Node.js
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: '{AWS_KEY}',
secretAccessKey: '{AWS_SECRET}',
region: '{SNS_REGION}'
});
var sns = new AWS.SNS();
@nmsdvid
nmsdvid / new_gist_file.js
Created February 4, 2014 16:32
Simple JavaScript Debounce Function
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
clearTimeout(timeout);